Commit Graph

128 Commits

Author SHA1 Message Date
Benjamin Gray
ce7b8b2a7e 🔥 useless return in handleGrammarUsed 2018-06-16 22:00:46 +10:00
Benjamin Gray
e84662743a Support activation hooks by grammar scope 2018-06-16 21:40:31 +10:00
Max Brunsfeld
d4e132067b Avoid masking exceptions as cancellations in Workspace.open 2018-05-29 13:26:15 -07:00
hansonw
d646f70f12 Handle cases where the item may be destroyed 2018-05-15 11:32:31 -07:00
hansonw
1f685768d5 Ensure grammar activation hooks are called after emitting new editors 2018-05-15 11:32:31 -07:00
Ash Wilson
f927651e6e Giant-ass try/finally block 2018-03-23 16:36:35 -04:00
Ash Wilson
c16287fbdd Track Promises for URLs that are being opened asynchronously 2018-03-23 16:26:35 -04:00
Antonio Scandurra
e68a2b1eb9 Replace import and export keywords with require and module.exports 2018-01-19 09:43:55 +01:00
Antonio Scandurra
a7e642e473 Destroy underlying element when resetting or destroying Workspace 2018-01-12 16:06:35 +01:00
Wliu
7fcfdcec00 Test assertions correctly 2017-12-04 22:58:59 +01:00
Wliu
3998556a0a Merge branch 'master' into wl-async-confirm 2017-12-04 22:49:12 +01:00
Max Brunsfeld
6e2ac3548f Ensure that all opened editors' buffers are added to the project
Assigning a language mode happens when adding a buffer to the project,
so we need to guarantee this happens to all buffers used by visible editors.
2017-12-01 09:58:19 -08:00
Wliu
131c13db3e 🎨 2017-11-19 00:35:40 +01:00
Wliu
3d9f6bc664 Update other uses of .confirm for new async API 2017-11-18 01:46:39 +01:00
Wliu
8f81831ad4 Convert large file warning 2017-11-18 00:56:22 +01:00
Wliu
47963ef2e5 And test it with editor:checkout-head-revision 2017-11-17 23:32:53 +01:00
Max Brunsfeld
fe6b385c97 Move largeFileMode logic to TokenizedBuffer 2017-11-06 17:07:23 -08:00
Max Brunsfeld
140a783011 Start work on switching to new language mode API 2017-11-03 00:12:33 -07:00
Wliu
4eea63c50b 📝 2017-10-30 10:31:41 +01:00
Wliu
e4044699dc 📝
[ci skip]
2017-10-27 21:49:27 +02:00
Max Brunsfeld
cca04f85a3 📝 Document async onWillDestroyItem behavior 2017-09-12 15:19:46 -07:00
Will Binns-Smith
128f702784 Add documentation to addModalPanel api 2017-08-22 23:14:54 -07:00
Wliu
8963cf4955 Only use multiline if the flag is passed in 2017-08-10 13:24:46 -04:00
Wliu
2fa2feacaf Multiline is important, don't forget to set it 2017-08-09 22:52:39 -04:00
Wliu
b6fb15fce3 📝
[ci skip]
2017-07-19 16:21:56 -04:00
Antonio Scandurra
62ee913567 Ensure custom title bar is always updated when document.title changes
This commit uses a new private API on Workspace that emits an event
every time the window title gets updated (e.g. as a result of an active
pane item changing, the project paths changing, etc.).

This fixes a bug that left the custom title bar with a stale
document.title under some circumstances.

Signed-off-by: Jason Rudolph <jasonrudolph@github.com>
2017-06-26 16:29:31 +02:00
Max Brunsfeld
c1c0e7e921 Merge pull request #14736 from atom/fb-mdt-observe-dock-visibility
Add methods for observing dock visibility
2017-06-22 14:11:52 -07:00
Max Brunsfeld
2420d12e44 Merge pull request #14435 from atom/mb-use-native-text-buffer
Use new native text-buffer implementation
2017-06-08 16:50:53 -07:00
Jason Rudolph
5d7e9a622f Merge pull request #14640 from atom/jr-directional-pane-navigation-for-entire-workspace
Teach directional pane navigation commands to support docks
2017-06-08 19:15:33 -04:00
Matthew Dapena-Tretter
ca6254dd66 Add methods for observing dock visibility 2017-06-07 16:24:28 -07:00
Wliu
7c48291333 🔥 getPaneContainers from the API 2017-06-07 10:55:26 -04:00
Wliu
55a0fcb3f2 📝 Document pane location methods in Workspace 2017-06-06 23:33:46 -04:00
Max Brunsfeld
3b56ef8cbf Merge remote-tracking branch 'origin/master' into mb-use-native-text-buffer 2017-06-06 17:12:34 -07:00
Jason Rudolph
e1719a8923 Teach Workspace::reset() to properly reset hasActiveTextEditor 2017-06-02 15:56:13 -04:00
Jason Rudolph
2347c9bdaa Always invoke callback with current active text editor
This makes observeActiveTextEditor consistent with observers like
observeActivePaneItem, which always invoke the callback with the current
value, regardless of whether that value is undefined or not.
2017-06-02 15:55:00 -04:00
Jason Rudolph
9629caefb7 Remove unnecessary serialization 2017-06-02 15:09:20 -04:00
Jason Rudolph
5b61c0a949 🐛 Initialize active editor state correctly after reload
Fixes the following bug:

1. Open Atom
2. Open a file
3. Observe the file's encoding in the status bar
4. Reload Atom
5. Close the file
6. Observe that the closed file's encoding is still present in the
status bar

This bug occured because the reload did not deserialize/serialze the
workspace's active text editor state. As a result, when closing the
text editor in step 5, we failed to notify observers that there is no
longer an active text editor.
2017-06-02 08:01:42 -04:00
Jason Rudolph
5dfbb65b0e 🎨 Reduce ternaries 2017-06-01 17:09:38 -04:00
Jason Rudolph
6a694f80f4 🎨 Replace instanceof check with nullness check
xref: https://github.com/atom/atom/pull/14695#discussion_r119721719
2017-06-01 17:04:43 -04:00
Jason Rudolph
fe550a1b03 🎨 Refactor: Introduce explaining variable
xref: https://github.com/atom/atom/pull/14695#discussion_r119721719
2017-06-01 17:04:17 -04:00
Jason Rudolph
14d8eccc6e 📝 Add API docs for observeActiveTextEditor(callback) 2017-06-01 15:47:31 -04:00
Jason Rudolph
5b52d8c77a 📝 Add API docs for onDidChangeActiveTextEditor(callback) 2017-06-01 15:44:37 -04:00
Max Brunsfeld
dc320181fc Fix handling of .save and .saveAs rejections
* Make Pane.close, Pane.saveActiveItem, and Pane.saveActiveItemAs async.
* Refactor the logic for prompting to save on window unload
2017-05-31 17:46:04 -07:00
Jason Rudolph
05efc143ed Add Workspace::observeActiveTextEditor() 2017-05-31 16:17:54 -04:00
Jason Rudolph
cf50625cc6 Teach Workspace::getActiveTextEditor() to get item from center 2017-05-31 14:32:20 -04:00
Jason Rudolph
cd24e820f5 💚 Fix linter failure 2017-05-31 13:13:09 -04:00
Jason Rudolph
8cae9a1365 🎨 Refactor: Extract getVisiblePanes() function 2017-05-31 12:01:10 -04:00
Jason Rudolph
0e3dfc3ba1 🎨 Refactor: Extract getVisiblePaneContainers() function 2017-05-31 11:57:57 -04:00
Max Brunsfeld
6c0b70f5f3 Start work on integrating new native TextBuffer version 2017-05-19 11:33:49 -07:00
Max Brunsfeld
07c2a8e8d6 Merge pull request #14339 from atom/mb-dont-change-focus-when-hiding-unfocused-dock
Don't change focus when hiding an unfocused dock
2017-05-11 16:28:27 -07:00