Commit Graph

296 Commits

Author SHA1 Message Date
Leo Lamprecht
0ceacf5c13 OSX -> macOS 2016-06-20 11:29:10 +02:00
Leonard Lamprecht
3a1ad3fd40 Replace OS X and Mac OS with macOS 2016-06-18 15:33:08 +02:00
Antonio Scandurra
f9039a35f6 Refactor isRowVisible to isRowRendered
There's a distinction to make between rendered and visible rows, and we
were using the former as if it was the latter. In particular, if a tile
is visible, all its rows get rendered on screen, even though they might
not necessarily be visible by the user.
2016-05-14 17:38:49 +02:00
Antonio Scandurra
7b2f049cbb 🎨 Refine binary search algorithm 2016-04-29 16:51:51 +02:00
Antonio Scandurra
ebfd821237 Destroy folds corresponding to fold-markers and not the whole buffer row 2016-04-26 10:47:42 +02:00
Antonio Scandurra
bbef0b4551 💚 2016-04-14 11:19:45 +02:00
Nathan Sobo
be05071462 Merge remote-tracking branch 'origin/master' into ns-use-display-layers 2016-04-08 15:18:44 -06:00
joshaber
130c400758 Remove unnecessary fat arrow.
Looks like this was introduced in https://github.com/atom/atom/pull/11369. 
🙈
2016-04-07 11:25:00 -04:00
Nathan Sobo
85ab86df10 Merge branch 'master' into ns-use-display-layers 2016-04-05 16:40:41 -06:00
Antonio Scandurra
108513f994 Fix LinesYardstick specs to use the new tagCode-based scope structure
Also, remove specs testing RTL behavior. They don’t work as of today,
and I think we need a better approach to handle them, that doesn’t
solely rely on the DOM, but actually takes into account that e.g. (0, 0)
is the rightmost character on a right-to-left string.
2016-04-05 10:47:25 +02:00
Nathan Sobo
9833e54ec3 Fix typo 2016-04-04 19:22:44 -06:00
Nathan Sobo
f638bcbb6d Don’t assume the accented character menu on every IME event 2016-04-04 18:56:08 -06:00
Nathan Sobo
a99ee14ac0 Make accented character menu detection work with left/right arrow keys 2016-04-04 17:47:36 -06:00
Isaac Salier-Hellendag
2a7344091d Avoid setting hidden input value on textInput
Atom currently sets the `value` of the input on every `textInput` event, in an effort to appropriately handle changes made via the OSX diacritic menu (for accents, umlauts, etc).

The drawback of this is approach is that updating the value of the input will trigger layout and a subsequent layer tree update.

To resolve this, here is my proposal:

  - Track a flag for `keypress` events. When the diacritic menu is used, there are two `textInput` events, with no `keypress` in between. Therefore, when no `keypress` has occurred just prior to a `textInput`, the editor model can select the previous character to be replaced by the new accented character.
  - Track a flag for `compositionstart` events. When a user is in IME mode, the diacritic menu cannot be used, so the editor can skip the backward selection.

Test Plan:

Tested in a plaintext file.

  - Type Latin characters, verify proper character insertion.
  - Press and hold <kbd>a</kbd>. Diacritic menu appears. Select an option using the keyboard or mouse. Verify that the `a` is replaced by an accented `a`, with no extra characters.
  - Type test strings in Katakana, 2-Set Korean, Telex (Vietnamese), Simplified Pinyin. Verify that characters are inserted correctly while composing, and after committing strings.
2016-04-04 13:33:43 -07:00
joshaber
98c8a08ac3 s/ignoreScrollPastEnd/scrollPastEnd 2016-03-03 10:06:15 -05:00
joshaber
ff0b9e30a9 Add ignoreScrollPastEnd 2016-02-25 16:59:58 -05:00
joshaber
dd780a7c5a Revert "Use the computed style to find the height"
This reverts commit 822cd78055.
2016-02-25 15:41:55 -05:00
joshaber
822cd78055 Use the computed style to find the height 2016-02-25 15:18:29 -05:00
Wliu
7ee74ed4c7 Merge branch 'master' into wl-electron-35 2016-01-15 17:20:31 -05:00
Antonio Scandurra
a812f282a2 Measure decorations only for visible editors 2016-01-14 12:36:23 -07:00
Antonio Scandurra
f81843d465 Merge branch 'master' into as-block-decorations 2016-01-14 09:30:06 -07:00
Wliu
d855613340 Merge remote-tracking branch 'refs/remotes/origin/master' into wl-electron-35 2016-01-05 17:25:51 -05:00
Nathan Sobo
6669703677 Force a sync render when measuring if we don’t have a DOM node for a row 2016-01-04 16:40:56 -07:00
Nathan Sobo
9f6fbacddd Don’t clip screen positions in yardstick
By clipping positions only in the TextEditorComponent, we can ensure
that we check for the presence of a rendered line for the clipped row
value.
2016-01-04 16:32:38 -07:00
Antonio Scandurra
07234c5109 Resize all block decorations when width changes 2015-12-19 12:50:58 +01:00
Antonio Scandurra
8710089cb7 Support only Shadow DOM enabled editors 2015-12-18 15:43:23 +01:00
Antonio Scandurra
db9f67b9a5 🔥 Remove maxRow parameter 2015-12-18 15:41:46 +01:00
Antonio Scandurra
6a403e441e Start integrating tree-based LineTopIndex 2015-12-18 10:41:21 +01:00
Antonio Scandurra
8c1f0b0e21 Merge branch 'master' into as-block-decorations
# Conflicts:
#	spec/fake-lines-yardstick.coffee
#	spec/lines-yardstick-spec.coffee
#	spec/text-editor-presenter-spec.coffee
#	src/lines-yardstick.coffee
#	src/text-editor-component.coffee
#	src/text-editor-presenter.coffee
2015-12-18 09:59:12 +01:00
Antonio Scandurra
cfb30c795d Use an updated version of LineTopIndex 2015-12-14 15:04:54 +01:00
Cheng Zhao
f6e889aeb2 Merge branch 'master' into wl-electron-35 2015-12-11 09:32:32 +08:00
Cheng Zhao
1725b9bf54 Use require('electron') 2015-12-11 09:30:58 +08:00
Nathan Sobo
85c6139579 Don’t force DOM updates in LinesYardstick
Instead, determine the need for a DOM update in the component before
measuring with the lines yardstick, and break `updateSync` into two
explicit pre- and post-measurement phases.
2015-12-10 14:47:05 -07:00
Antonio Scandurra
cc4344735e 💚 Fix specs 2015-12-03 17:11:38 +01:00
Antonio Scandurra
937116a280 Render only visible and yet-to-be-measured block decorations 2015-12-03 11:26:45 +01:00
Antonio Scandurra
9ef3ecf378 Handle off-screen measurements properly 2015-12-02 18:34:57 +01:00
Antonio Scandurra
f30e4ccc9d Use the new LineTopIndex in TextEditorPresenter 2015-12-02 16:01:55 +01:00
Antonio Scandurra
d24290357a Implement block decorations in the components land 2015-12-01 13:36:23 +01:00
Antonio Scandurra
da1fd69a1f Start implementing BlockDecorationsComponent 2015-11-30 15:48:09 +01:00
Wliu
fec1507ff4 Require ipc-renderer where it belongs 2015-11-18 21:10:40 -05:00
Wliu
6cd480b37e Fix Electron deprecations 2015-11-17 21:16:09 -05:00
Max Brunsfeld
fefb387d3c Merge branch 'master' into mb-synchronous-scroll-position
Conflicts:
	src/text-editor-presenter.coffee
	src/text-editor.coffee
2015-11-10 16:23:39 -08:00
Nathan Sobo
4b5e4d02eb Use real clock in text-editor-component-spec
This will make it much easier to test asynchronous update logic.
2015-11-09 00:35:18 -07:00
Max Brunsfeld
b58752da38 Keep model's logical scroll position up to date
* Remove scrollRow and scrollColumn properties from the presenter
* Assign presenter's scrollTop and scrollLeft based on model's first visible
  screen row and column, once the presenter has the required measurements.
2015-11-06 11:16:56 -08:00
Antonio Scandurra
40e3b08a8c Add TextEditorElement::getMaxScrollTop 2015-10-20 08:36:27 +02:00
Nathan Sobo
4c51d29868 Merge remote-tracking branch 'origin/master' into ns-alternative-test-env 2015-10-07 16:10:29 -05:00
Nathan Sobo
3636eb35d8 Merge pull request #8811 from atom/as-double-reflow-measurements
DOM-based measurements
2015-10-07 15:43:59 -05:00
Antonio Scandurra
097a035dc4 Don't use atom globals in OverlayManager 2015-10-07 15:25:02 -05:00
Antonio Scandurra
534f038631 Don't use atom globals in TokenIterator 2015-10-07 15:25:02 -05:00
Antonio Scandurra
eba18092fb Don't use atom globals in LinesComponent 2015-10-07 15:25:02 -05:00