Commit Graph

411 Commits

Author SHA1 Message Date
Ash Wilson
f4e9b62261 Insert "position: after" decorations in increasing order 2019-02-01 13:18:34 -05:00
Ash Wilson
e8d304b8c7 Sort block decorations to render by order, then id 2019-02-01 13:14:39 -05:00
David Wilson
1276f6f85d Use new attributeStyleMap for elements
More info here: https://developers.google.com/web/updates/2018/03/cssom
2019-01-18 15:13:24 -08:00
Ash Wilson
5912301563 Trigger a re-updateSync when gutter dimensions have changed 2018-09-21 13:15:38 -04:00
Max Brunsfeld
467415af19 Merge branch 'master' into wl-rm-safe-clipboard 2018-08-24 11:57:36 -07:00
Ash Wilson
95658c3769 👕 2018-07-27 11:18:35 -04:00
Ash Wilson
65bcd888f3 Update LineNumberComponent correctly when "number" changes 2018-07-27 10:18:42 -04:00
Ash Wilson
0f771ea604 Only pass and respect width for the One True Gutter 2018-07-25 09:43:31 -04:00
Ash Wilson
3ec43b913f 👀 2018-07-25 09:18:52 -04:00
Ash Wilson
192cf3b3fd mousedown !== mousemove 2018-07-25 08:26:21 -04:00
Ash Wilson
2a1719f337 Pass bufferRow and screenRow as numbers 2018-07-25 08:21:55 -04:00
Ash Wilson
291bf4d835 Pass maxDigits to labelFn 2018-07-24 12:27:33 -04:00
Ash Wilson
fdf5d50196 Support custom onMouseDown and onMouseMove event handlers 2018-07-24 12:20:30 -04:00
Ash Wilson
c064c87188 Add a custom CSS class to the Gutter's root element 2018-07-24 10:52:50 -04:00
Ash Wilson
4dc062958d decorateMarker({type: 'line-number') only decorates the one true gutter 2018-07-24 10:44:34 -04:00
Ash Wilson
931629769c 👕 oh right standardjs 2018-07-24 10:31:17 -04:00
Ash Wilson
10c2e2932c Set gutter-name correctly on custom line number gutters 2018-07-24 10:26:47 -04:00
Ash Wilson
65dceec045 Initialize lineNumbersToREnder.screenRows 2018-07-24 10:26:31 -04:00
Ash Wilson
795c3b27aa Use type instead of kind 2018-07-24 09:53:14 -04:00
Ash Wilson
e61b180777 Respect a custom label generation function 2018-07-24 09:38:57 -04:00
Ash Wilson
e832c0b8dd Support multiple kind: line-number gutters 2018-07-24 09:38:11 -04:00
Ryan Holinshead
79de674508 Currently, the updateClassList function on the TextEditorComponent does not properly re-add its managed classes (editor, is-focused, mini) to the element when the element has been re-rendered with changed classes passed in. This fixes the issue by always adding the newClassList classes to the element and relying on the element.classList.add to determine if the classes already exist (and should be ignored)
Released under CC0
2018-07-13 16:45:04 -07:00
Max Brunsfeld
0148ee7d9b Always leave room for scrollbars 2018-06-07 14:42:06 -07:00
Ash Wilson
0c2f458497 Boolean logic, my old enemy 2018-04-12 14:13:38 -04:00
Ash Wilson
4e9544583b Can't use the same name for the property and method 2018-04-12 14:07:17 -04:00
Ash Wilson
1545768522 Derive the readonly attribute from model.isReadOnly() 2018-04-12 13:23:12 -04:00
Ash Wilson
6ee477a329 Disable the hidden input when the model is readOnly or keyboard disabled 2018-04-12 11:50:53 -04:00
Antonio Scandurra
26837d65b4 Clip cursor width when soft-wrap is on and cursor is at the end of line
This prevents the parent tile from disabling sub-pixel anti-aliasing.
For some reason, adding `overflow: hidden` to the cursor container
element doesn't solve the issue, so we're adding this workaround
instead.
2018-03-13 12:04:35 +01:00
Linus Eriksson
de54e55878 Fix shaking editor when typing
When using DPI scaling the scroll position could be set to a position
that
was not possible causing a scroll event to scroll back. This was causing
the editor to shake when editing. This PR fixes
this by rounding scrollTop and scrollLeft to a physical pixel instead of
rounding using Math.round

Co-authored-by: Antonio Scandurra <as-cii@github.com>
2018-03-05 17:37:30 +01:00
Nathan Sobo
e334f0419f Merge pull request #16753 from billyjanitsch/revert-15487
Stop scaling up small scroll wheel events
2018-02-16 11:58:33 -08:00
Linus Eriksson
8cfcdf8c00 Revert always return false 2018-02-15 23:12:35 +01:00
Linus Eriksson
63326e969a Unfocus test and always return false to see if this fails on circle 2018-02-15 22:53:29 +01:00
Linus Eriksson
3059d14bd7 Merge remote-tracking branch 'origin/master' into b3-failing-seed 2018-02-15 19:49:58 +01:00
Billy Janitsch
a433e974eb Stop scaling up small scroll wheel events 2018-02-15 10:42:57 -08:00
Wliu
7e0635d2c0 Fix spec 2018-01-26 18:41:57 -05:00
Wliu
be24e6edf7 Revert change to move mouse cursor on right-click 2018-01-24 11:22:41 -05:00
David Wilson
6d09a5257a Fix #16538: Middle-click pastes into read only editor on Linux
This change fixes an issue where users on Linux are able to paste into
read only TextEditors by clicking the middle mouse button.  The fix is
to check for whether the TextEditorComponent's isInputEnabled method
returns true before pasting with middle click on Linux.
2018-01-22 18:50:07 -08:00
Linus Eriksson
b7138a0410 Add these changes to the non scheduled code path 2018-01-19 19:11:16 +01:00
Linus Eriksson
e07a9a6387 Merge branch 'master' of https://github.com/atom/atom into b3-failing-seed 2018-01-19 19:08:21 +01:00
Antonio Scandurra
3fbfadde5a Don't break subpixel AA when cursor is at the end of longest line
With the Electron upgrade, something changed in the way characters are
rendered/measured, and that was causing subpixel anti-aliasing to stop
working when cursors were at the end of the longest line.

Every cursor has a width that is calculated in the following way:

* If there's a character after the cursor, the width corresponds to
width of such character.
* Otherwise, the width equals to the "base character width" measured on
a dummy line.

In the latter case, even if we were setting the width of the content
container to account for the width of such cursor, some rounding problem
was causing the cursor to be able to escape the container and thus break
subpixel anti-aliasing.

With this commit, instead of rounding the value we assign to the
container width, we will always ceil it. This ensures that cursors are
always strictly contained within the parent element and resolves the
subpixel anti-aliasing issue.
2018-01-19 11:20:53 +01:00
Wliu
cd84216f11 Merge branch 'master' into wl-rm-safe-clipboard 2018-01-09 21:39:04 -05:00
Antonio Scandurra
c48ba79f3c Prevent selection of non-text content in editor
Signed-off-by: Nathan Sobo <nathan@github.com>
2018-01-09 15:16:17 +01:00
Antonio Scandurra
3d21ac0742 Render highlights behind lines
This fixes a bug most likely introduced with #16511 by ensuring that UI
elements (such as selections) never cover up the text.

Signed-off-by: Nathan Sobo <nathan@github.com>
2018-01-09 15:15:54 +01:00
Nathan Sobo
4926fe466c Move highlights container into lines for theme compatibility 2018-01-08 13:16:46 -07:00
Wliu
a1668fc953 Remove old clipboard workaround on Linux 2018-01-04 20:59:32 -05:00
Jason Rudolph
408070e913 Set the tabIndex on the input element
This commit reverts a portion of the changes introduced in
9eac520e6a. Prior to that commit, we were
setting the tabIndex to -1 on the atom-text-editor element. This commit
restores that behavior.

Instead of setting a custom tab index directly on the atom-text-editor
element, we instead set the tabIndex on the input element *inside* the
atom-text-editor element.

With these changes in place, you can successfully use the tabIndex to
define the tab order for atom-text-editor elements. 😅
2018-01-04 14:31:11 -05:00
itsmichaelwang
e462d0d298 Fix lint issue 2018-01-04 14:23:12 -05:00
itsmichaelwang
9eac520e6a Allow you to tab through modal text box 2018-01-04 14:23:12 -05:00
Antonio Scandurra
69799d35b2 Delete Chrome 56 workarounds 2017-12-22 14:44:17 +01:00
Antonio Scandurra
8b3c3bcfcf Loosen containment rules on dummy scrollbar elements
This commit uses `content` containment (i.e. `layout paint style`) as
opposed to `strict` containment (i.e. `layout paint style size`) for
dummy scrollbar elements.

By removing `size` containment we are fixing a rendering bug that was
preventing the scrollbar from being sized correctly. This problem was
caught by a TextEditorComponent test
(https://circleci.com/gh/atom/atom/6393).
2017-12-22 14:29:22 +01:00