Commit Graph

28396 Commits

Author SHA1 Message Date
Nathan Sobo
af28fa0752 When copying, create selections marker layer on the *new* display layer
Previously, we were copying the selections marker layer into the current
editor’s display layer. This would work fine until the spatial mapping
drifted in the copied editor, and would then have counterintuitive
results.
2016-04-05 18:47:11 -06:00
Nathan Sobo
b922262871 Avoid internal deprecation warning on getHeight 2016-04-05 17:18:24 -06:00
Nathan Sobo
85ab86df10 Merge branch 'master' into ns-use-display-layers 2016-04-05 16:40:41 -06:00
Nathan Sobo
26ddee4a05 ⬆️ autocomplete-plus 2016-04-05 16:40:15 -06:00
Nathan Sobo
b3ea0a6494 ⬆️ bookmarks 2016-04-05 16:40:06 -06:00
Nathan Sobo
a790ae2158 Avoid deprecation warnings for methods that are now on TextEditor 2016-04-05 12:12:14 -06:00
Nathan Sobo
117a3fb1b5 Provide deprecated TextEditor.prototype.displayBuffer shim
Even though it was a private field, we used it in some of our packages
and it is widespread enough to warrant some effort to smooth the
transition.

Also, we added a couple methods that were formerly implemented on
DisplayBuffer to TextEditor itself because they were used in packages.
2016-04-05 12:11:55 -06:00
Antonio Scandurra
ebd9e71b0b Make serialization format backwards/forwards compatible
Also, introduce a serialization version so we can drop the compatibility
fallbacks in the future.
2016-04-05 11:27:15 -06:00
Antonio Scandurra
bef7539e34 Refactor DisplayBuffer to DecorationManager
This commit moves all the remaining concerns not related to decorations
out of `DisplayBuffer` and into `TextEditor`. This means the
`DisplayBuffer` is now free to be renamed to `DecorationManager`.
2016-04-05 18:43:08 +02:00
Nathan Sobo
2dea35e6fb Merge pull request #11369 from hellendag/text-input
🐎 Avoid setting hidden input value on textInput
2016-04-05 09:34:55 -06:00
Antonio Scandurra
0cf0d6f587 🔥 Remove unused code
Now that `DisplayLayer` was fully implemented, we can start deleting those 
codepaths in `DisplayBuffer` that are now covered by this new abstraction.
2016-04-05 15:38:52 +02:00
Antonio Scandurra
712b1f1f88 Fix LanguageMode specs
Also, avoid creating folds twice for the same position when calling
`foldAll`.
2016-04-05 14:19:59 +02:00
Antonio Scandurra
544b75c7b0 🔥 💚 Fix TokenizedBuffer specs 2016-04-05 12:19:45 +02:00
Antonio Scandurra
80b956e996 💚 Fix TextDecorationLayer API specs in TokenizedBuffer 2016-04-05 11:39:06 +02:00
Antonio Scandurra
e6cfb8d587 Use a zero-width nbsp as our fold character 2016-04-05 11:34:14 +02:00
Antonio Scandurra
a083a754a5 💚 Fix TextEditorPresenter specs 2016-04-05 11:12:51 +02: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
fd3789223c ⬆️ status-bar 2016-04-04 19:53:41 -06:00
Nathan Sobo
402a335eef Fix accented character menu spec 2016-04-04 19:50:39 -06: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
Wliu
9eff3a952b ⬆️ language-ruby@0.68.5 2016-04-04 20:18:59 -04:00
Nathan Sobo
244f117d95 Handle empty client rects in LinesYardstick
getBoundingClientRect returns garbage values if the range has zero
width, which it does in the case of a fold placeholder or any other
zero-width character.

Sometimes getClientRects() returns an empty list, so we fall back to the
bounding rect in these cases.
2016-04-04 18:08:34 -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
Damien Guard
5c8669a4e8 Merge pull request #11246 from damieng/dg-windows-build-improve
Improve the Windows build process
2016-04-04 15:23:21 -04:00
Nathan Sobo
bbef4c67c3 Get the TextEditorComponent specs green 2016-04-04 11:21:41 -06:00
Antonio Scandurra
fd960e9a37 Merge branch 'master' into ns-use-display-layers 2016-04-04 15:25:50 +02:00
Michelle Tilley
8575b38c7b Pending pane items shouldn't be made permanent before being replaced
Previously, when a Pane would replace a pending item with
another pending item, it would emit
`onItemDidTerminatePendingState` for that item, which was
not true because the item was actually being destroyed.
2016-04-02 17:48:24 -07:00
Wliu
f1cf66ba32 ⬆️ language-csharp@0.12.1 2016-04-02 10:42:55 -04:00
Wliu
5b8315e37c Merge pull request #11351 from atom/fk_update_language-perl
⬆️ language-perl@0.33.0
2016-04-02 10:20:59 -04:00
Florian Kinder
3d8ce38e6b ⬆️ language-perl@0.33.0 2016-04-02 15:37:59 +02:00
Wliu
0330e33667 ⬆️ language-c@0.51.3 2016-04-01 21:56:56 -04:00
Antonio Scandurra
4d52479ce3 Merge pull request #11345 from atom/as-fix-pinch-to-zoom
Disable zoom every time a display gets added or removed
2016-04-01 18:21:46 +02:00
Antonio Scandurra
793f5f9692 Disable zoom every time a display gets added or removed 2016-04-01 16:04:01 +02:00
Wliu
2c05b9bf68 Merge pull request #11339 from coliff/patch-4
HTTPS a couple of links
2016-04-01 09:28:18 -04:00
Antonio Scandurra
5464883c1e Merge pull request #11341 from atom/as-fix-auto-updater-events
Use application-level events to control updates in the browser process
2016-04-01 14:14:52 +02:00
Antonio Scandurra
158d019371 Use application-level events to control updates in the browser process 2016-04-01 10:56:30 +02:00
simurai
9b4e451333 ⬆️ solarized-dark/light-syntax@v1.0.2 2016-04-01 17:27:14 +09:00
Antonio Scandurra
2b05995b1c ⬆️ about 2016-04-01 09:12:01 +02:00
Antonio Scandurra
c735b3fe74 Merge pull request #11314 from atom/as-handle-update-error
Handle auto-updater errors
2016-04-01 09:09:37 +02:00
Antonio Scandurra
fa469121d8 Ensure getErrorMessage() works properly 2016-04-01 09:09:25 +02:00
Christian Oliff
bb11c4e5bd HTTPS a couple of links
HTTPS a couple of links
2016-04-01 15:20:00 +09:00
simurai
6f1c1fd0e0 ⬆️ one-dark/light-ui@v1.3.1 2016-04-01 11:17:57 +09:00
Nathan Sobo
34e2bf13ce Add native profiling instructions 2016-03-31 16:59:36 -06:00
Lee Dohm
a058f3721f Merge pull request #11316 from atom/ld-issue-template-os-version
Add request for OS and version to Issue Template
2016-03-31 10:31:15 -07:00
Antonio Scandurra
51d71b4b55 Merge pull request #11325 from atom/as-fix-emojis
Fix emoji rendering on OSX
2016-03-31 17:45:58 +02:00
Antonio Scandurra
47bbd8b4bb Ensure we test for emojis only on Darwin 2016-03-31 17:45:32 +02:00
Damien Guard
0f615ff4e6 Merge pull request #11329 from atom/tj-fix-nullref-callback
Fix potential null reference callback invokation in script/clean
2016-03-31 08:27:18 -04:00
Thomas Johansen
22acdb76f6 🐛 Fix potential null reference callback invokation
Fixes #11328
2016-03-31 13:24:14 +02:00