Commit Graph

8410 Commits

Author SHA1 Message Date
David Wilson
dbd4a0a4c0 Preserve TextEditor settings when language mode changes
This change fixes #13829 which reports that the `softWrapped` setting of
an untitled TextEditor is lost when the buffer is saved to a file.  This
is caused by logic that updates TextEditor settings when the buffer's
language mode changes.

The fix is to preserve any TextEditor settings that would not change when
switching between the previous and current language mode of the buffer.
2018-01-12 13:51:35 -08:00
Antonio Scandurra
a5c0223592 Fix race condition between opening new files and restoring window state
This commit fixes a race condition in the
`attemptRestoreProjectStateForPaths` function that could cause a file to
be opened more than once within the same workspace pane.

In particular, when opening some file into an empty window, Atom tries
to recover the state for the project containing the file (if there is
one). However, we were previously not waiting until the
`AtomEnvironment`'s state had been fully deserialized before trying to
load the requested file into the workspace. If the same file also
existed in the serialized representation of the workspace, it could end
up being opened twice.

With this commit we will now wait until the environment has been fully
deserialized before honoring the user's request of loading new files
into an empty window. Also, tests have been restructured to test more
thoroughly this interaction.
2018-01-10 13:22:09 +01:00
Wliu
c84eeb3ae0
Merge branch 'master' into wl-async-save-dialog 2018-01-09 17:20:57 -05:00
Wliu
cd123456ca
Merge pull request #16229 from atom/wl-async-confirm
Make atom.confirm async
2018-01-09 17:19:51 -05:00
Antonio Scandurra
450d6b12fa Don't add fully-contained selections above/below
This is slower than it needs to be and creates behavioral problems when
selections get merged in some cases.

Signed-off-by: Nathan Sobo <nathan@github.com>
2018-01-09 16:47:26 +01:00
Nathan Sobo
dced608f47
Merge pull request #14931 from UziTech/atom-commands-onDidFinish
atom.commands.onDidFinish
2018-01-09 06:12:45 -07:00
Tony Brix
54d011450f listener calls are reversed 2018-01-08 20:02:34 -06:00
Tony Brix
aabbea6542 jasmine.useRealClock() 2018-01-08 19:41:34 -06:00
Max Brunsfeld
3f710a1398 Merge pull request #12783 from vedharish/editor_delete_line 2018-01-08 15:58:22 -08:00
Tony Brix
ec07003d39 fix timeout 2018-01-08 17:14:49 -06:00
Tony Brix
2f7de33ff0 add return value tests 2018-01-08 16:38:25 -06:00
Nathan Sobo
4926fe466c Move highlights container into lines for theme compatibility 2018-01-08 13:16:46 -07:00
Wliu
5c3d6abb12
Merge branch 'master' into wl-async-confirm 2018-01-07 21:08:32 -05:00
Wliu
b69631a444
Merge branch 'master' into wl-async-save-dialog 2018-01-07 20:55:16 -05:00
Max Brunsfeld
fe4d14444f Merge branch 'master' into mb-tree-sitter-parsers 2018-01-05 19:59:52 -08:00
Max Brunsfeld
386b786d93 Let 'atom --wait -a folder' exit due to removing the project folder 2018-01-05 17:50:11 -08:00
Max Brunsfeld
1f4ccf3024 Allow existing windows to be reused when running --wait 2018-01-05 17:50:11 -08:00
Max Brunsfeld
7f76320387 Backfill a test for existing --wait functionality 2018-01-05 17:50:11 -08:00
Bryant Ung
911b805065
Merge pull request #16295 from xfontes42/master
Add event handler for window resizing.
2018-01-05 17:01:15 -08:00
Bryant Ung
88e330d577
Remove trailing whitespace 2018-01-05 15:50:48 -08:00
Bryant Ung
8ec54a04e2
Add resize event spec 2018-01-05 15:49:37 -08:00
Max Brunsfeld
22766b93e7
Merge pull request #16495 from atom/mb-decaf-main-process
Decaffeinate some main process files
2018-01-05 14:25:51 -08:00
Tony Brix
327ee33fac move test 2018-01-05 15:25:13 -06:00
Max Brunsfeld
b645852142 Don't rely on promise resolution timing in main process spec 2018-01-05 13:01:33 -08:00
Tony Brix
03d16c4f5d return promise.all from dispatch 2018-01-05 14:53:59 -06:00
Tony Brix
f66ae07470 fix tests 2018-01-05 14:53:59 -06:00
Tony Brix
b02aa369ca rebase atom.commands.onDidFinish 2018-01-05 14:53:59 -06:00
Max Brunsfeld
1de37810f0 Rename hasQuitted -> didQuit 2018-01-05 12:11:10 -08:00
Max Brunsfeld
9b917dd8c8 Don't use babel for atom-application test 2018-01-05 12:11:10 -08:00
Jason Rudolph
5cce2b55bc
Add test for setting tabIndex on atom-text-editor element 2018-01-04 17:55:05 -05:00
Max Brunsfeld
2fa3b65364 Merge branch 'master' into mb-tree-sitter-parsers 2018-01-03 15:20:10 -08:00
Nathan Sobo
5743c41e03
Merge pull request #16282 from atom/io-electron-1.7
Upgrade electron to 1.7.10
2018-01-03 16:19:20 -07:00
Max Brunsfeld
6998c2df8c Merge branch 'master' into mb-tree-sitter-parsers 2018-01-03 14:53:06 -08:00
Max Brunsfeld
733d6381cc Fix handling of {undo: 'skip'} in TextEditor.insertText
Signed-off-by: Nathan Sobo <nathan@github.com>
2018-01-03 13:00:53 -08:00
Max Brunsfeld
629cb206ec Fix handling of empty tokens in TreeSitterHighlightIterator 2018-01-03 09:34:12 -08:00
Max Brunsfeld
aed6248b7b Merge branch 'master' into mb-tree-sitter-parsers 2017-12-29 16:21:54 -08:00
Ford Hurley
065f4c48ec Avoid dependency on shared state
The test was passing only when run in isolation.
2017-12-27 16:37:55 -05:00
Max Brunsfeld
0b6e994ac6 Merge branch 'master' into mb-tree-sitter-parsers 2017-12-27 12:35:51 -08:00
Ford Hurley
3ad3852dd6 Add a test for generated TextEditor ids 2017-12-27 15:16:22 -05:00
Antonio Scandurra
69799d35b2 Delete Chrome 56 workarounds 2017-12-22 14:44:17 +01:00
Antonio Scandurra
011766768a Fix AtomEnvironment tests 2017-12-22 12:05:03 +01:00
Wliu
84f6203a30
Merge pull request #16322 from atom/wl-more-history-fixes
More history manager fixes in specs
2017-12-21 12:20:06 -05:00
Wliu
1d6549a8e3
Merge pull request #16328 from atom/wl-right-click-selections
Update auxiliary click logic for moving cursors
2017-12-21 12:18:41 -05:00
Max Brunsfeld
c844a253e0 Implement TreeSitterLanguageMode.scopeDescriptorForPosition 2017-12-15 17:15:39 -08:00
Max Brunsfeld
4adfba47cc Support legacyScopeName field on tree-sitter grammars
* Use the field for mapping scope names in GrammarRegistry.grammarForId
* Use the field for adapting legacy scoped settings to work with tree-sitter parsers

Signed-off-by: Nathan Sobo <nathan@github.com>
2017-12-15 16:57:36 -08:00
Max Brunsfeld
f4fa7f910e Merge branch 'master' into mb-tree-sitter-parsers 2017-12-15 09:45:21 -08:00
Max Brunsfeld
e09ee1c1fa Fix error in TreeSitterHighlightIterator.seek 2017-12-15 09:44:45 -08:00
Damien Guard
ca53cf9ec1
Remove the texteditor isModified/isReadOnly handling intended for unsavable edit buffers as causes issues with vim-mode-plus 2017-12-13 09:17:30 -08:00
Max Brunsfeld
43c6f4ccb0 Merge branch 'master' into mb-tree-sitter-parsers 2017-12-11 09:18:31 -08:00
Bryant Ung
be3551cd18
Remove failing test 2017-12-08 16:50:40 -08:00