Commit Graph

15912 Commits

Author SHA1 Message Date
Nathan Sobo
41d5715ef6 Merge pull request #14790 from atom/ns-document-text-decorations
Document text decorations
2017-06-15 22:57:34 +02:00
Nathan Sobo
147e9dff42 Document text decorations 2017-06-15 22:15:31 +02:00
Paul Betts
2c29d99f33 Directly tell Squirrel what kinds of shortcuts to create 2017-06-14 15:08:35 -07:00
Antonio Scandurra
0a46c9ad7b Prevent block decorations from mistakenly wrapping during measurements
Before rendering block decorations, we read their heights by putting
them into a special div called `blockDecorationMeasurementsArea`.

Previously, this div was not explicitly sized, which was causing
decorations to wrap while being measured but not when actually rendering
them.

This commit fixes this inconsistency by explicitly styling the
measurement area so that it has the same width as the component scroll
width.
2017-06-13 12:31:27 +02:00
Lee Dohm
6edf6599b7 Merge pull request #14753 from tjkohli/master
Improved clarity of Editor not responding actions
2017-06-12 09:15:55 -07:00
Antonio Scandurra
d978a0f2cd Merge pull request #14734 from atom/as-ns-clip-autoscroll
Don't try to measure lines that don't exist
2017-06-12 17:20:17 +02:00
TJ Kohli
5524aca461 Improved clarity of Editor not responding actions
Changed "Close" to "Force Close" because "Close" might imply closing the Alert/Dialog instead of the editor, whereas "Force Close" better describes the action that button will take.
2017-06-10 19:30:52 -04:00
Antonio Scandurra
9a0709e95e Don't try to measure lines that don't exist
By the time that the animation frame is delivered, the requested
autoscroll
position could not exist anymore. This could cause the editor component
to measure a non-existent line and, as a result, throw an exception.

With this commit we will always ignore measurements for screen lines
that do not exist.
2017-06-09 18:40:24 +02:00
Max Brunsfeld
c6bf86c9b4 Merge pull request #14375 from atom/fb-mdt-ondidstopchangingactivepaneitem
Fix `PaneContainer::onDidStopChangingActivePaneItem()`
2017-06-08 17:25:31 -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
Matthew Dapena-Tretter
26d9579b0e 🐛 Fix PaneContainer::onDidStopChangingActivePaneItem()
We weren't ever dispatching this event! Oops XD
2017-06-08 16:42:32 -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
Jason Rudolph
f62cb5d427 🐛 Don't attempt to copy items that aren't copyable 2017-06-08 15:42:39 -04:00
Jason Rudolph
de47d3d439 🎨 Extract function: Pane::isItemAllowed(item) 2017-06-07 15:45:02 -04:00
Max Brunsfeld
f865a75c94 Fix exception on cancelling path selection when saving
Fixes #14722
2017-06-07 12:00:25 -07:00
Max Brunsfeld
8f106d2d44 Don't serialize undo/redo stacks when the user is idle 2017-06-07 11:21:39 -07:00
Jason Rudolph
296e407284 Check an item's allowed locations when moving/copying to pane 2017-06-07 12:59:54 -04:00
Wliu
0cd482cbf2 Merge pull request #14729 from atom/wl-fix-docks-docs
Fix Docks docs
2017-06-07 11:23:50 -04:00
Wliu
7c48291333 🔥 getPaneContainers from the API 2017-06-07 10:55:26 -04:00
Wliu
02258a9994 📝 Fix get{Left|Right|Bottom}Dock links 2017-06-06 23:34:47 -04:00
Wliu
55a0fcb3f2 📝 Document pane location methods in Workspace 2017-06-06 23:33:46 -04:00
Wliu
c34061a52e 📝 Document the WorkspaceCenter class 2017-06-06 23:33:29 -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
4fecbaf4f5 Merge master into jr-fix-observe-text-editor-methods 2017-06-06 13:59:35 -04:00
Jason Rudolph
268f94b89d Merge pull request #14695 from atom/jr-editors-live-in-workspace-center
Provide API for observing the active text editor
2017-06-06 10:09:52 -04:00
Jason Rudolph
0cadf7e888 Merge branch 'jr-editors-live-in-workspace-center' into jr-fix-observe-text-editor-methods 2017-06-05 17:07:31 -04:00
Antonio Scandurra
baca845e64 Fix not resetting unused styles in NodePool 2017-06-03 14:56:21 +02:00
Antonio Scandurra
f07e1eb009 Merge pull request #14698 from atom/as-ns-recycle-nodes
Recycle line and line number DOM nodes
2017-06-03 10:53:47 +02:00
Antonio Scandurra
ec774e143a Fix lint errors 2017-06-03 10:52:32 +02: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
Max Brunsfeld
d289ca4471 Fix unintended unload prevention for spec windows 2017-06-02 10:30:10 -07:00
Max Brunsfeld
a7736b81e3 Remove code for preserving cursor position on buffer reload
Updating the markers correctly is handled by TextBuffer. This
was actually breaking it.
2017-06-02 09:58:57 -07: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
Max Brunsfeld
307d63e1ed Fix handling of aborted save in Pane.saveItem 2017-06-01 15:10:09 -07:00
Max Brunsfeld
7535a9419f Use async/await in Pane spec 2017-06-01 14:42:45 -07: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
Jason Rudolph
09495dfc35 🔥 Remove broken Dock::getTextEditors() function
We're updating Atom to disallow editors in docks. As a result, we need
to remove Dock::getTextEditors(). Normally, we would deprecate a method
before removing it, but this method is broken and has never worked:

  atom.workspace.getLeftDock().getTextEditors()
  (unknown) Uncaught TypeError: this.paneContainer.getTextEditors is not a function
      at Dock.getTextEditors (/Applications/Atom.app/Contents/Resources/app/src/dock.js:590:37)
      at <anonymous>:1:30

Since the method is broken, we know that nobody is relying on it.
Instead of deprecating the method, we can just remove it.
2017-06-01 15:31:21 -04:00
Jason Rudolph
0b314ac1a9 🔥 Remove broken Dock::observeTextEditors(callback) fn
We're updating Atom to disallow editors in docks. As a result, we need
to remove Dock::observeTextEditors(callback). Normally, we would
deprecate a method before removing it, but this method is broken and has
never worked:

  atom.workspace.getLeftDock().observeTextEditors(console.log)
  (unknown) Uncaught TypeError: this.paneContainer.getTextEditors is not a function
      at Dock.getTextEditors (/Applications/Atom.app/Contents/Resources/app/src/dock.js:590:37)
      at Dock.observeTextEditors (/Applications/Atom.app/Contents/Resources/app/src/dock.js:396:41)
      at <anonymous>:1:30
  getTextEditors @ <embedded>:29933
  observeTextEditors @ <embedded>:29739
  (anonymous) @ VM1941:1

Since the method is broken, we know that nobody is relying on it.
Instead of deprecating the method, we can just remove it.
2017-06-01 15:26:12 -04:00
Jason Rudolph
f8ebd71200 Deprecate Dock::getActiveTextEditor() 2017-06-01 15:24:50 -04:00
Max Brunsfeld
12d0de0e03 Merge branch 'master' into mb-use-native-text-buffer 2017-06-01 11:09:09 -07:00
Jason Rudolph
e569f8fc4d 📝 Fix odd grammar in API docs 2017-06-01 12:08:09 -04:00
Lee Dohm
50603ef19c Merge pull request #14697 from atom/ld-activate-item-docs
📝 Add missing parameter documentation
2017-06-01 08:26:20 -07:00
Antonio Scandurra
a25134e97f Recycle line number nodes
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-06-01 17:24:18 +02:00
Lee Dohm
fdd4d52fcc 📝 Add missing parameter documentation 2017-06-01 08:24:14 -07:00