Commit Graph

1497 Commits

Author SHA1 Message Date
Kevin Sawicki
0adae3c634 Prompt to save dirty buffers from destroyEditSessionIndex
Previously only the active editor session was prompting to
save dirty buffers before closing.  This caused the confirm
dialog to not display when closing from a tab since the
Editor.destroyEditSessionIndex is used there.
2013-01-07 16:24:51 -08:00
Kevin Sawicki
5ded74b3e6 Close inactive editor sessions on alt-meta-w 2013-01-07 15:41:26 -08:00
Kevin Sawicki
b43c756820 Only deactivate the RootView once during shutdown
Previously window.shutdown() was called multiple times
if window.close() was called since the shutdown handler
was also fired in the native window controller.

This prevented proper serialization of the RootView
from occurring when then window was closed via meta-w or
meta-W since it was called a second time when already
empty of packages and editors.
2013-01-07 14:41:10 -08:00
Kevin Sawicki
0e082878f3 Close window on meta-W 2013-01-07 13:41:27 -08:00
Corey Johnson & Nathan Sobo
6efe533650 Add atom.getPackages so we can access package objects anywhere 2013-01-07 14:28:47 -07:00
Kevin Sawicki
2d4c4b3930 Support opening a path into a new split editor 2013-01-07 12:52:23 -08:00
Corey Johnson & Nathan Sobo
28c457f564 Add Cursor.getScopes and EditSession.getCursorScopes 2013-01-07 13:32:12 -07:00
Kevin Sawicki
b4654ea435 Use buffer position when end of word isn't found
Previously if null was returned for the end of word position then
it was interpreted as 0,0 which would select the entire contents
before the current word instead of the current word.
2013-01-07 11:30:30 -08:00
Kevin Sawicki
bbdff31faf Lowercase current word/selection with meta-U 2013-01-07 09:37:51 -08:00
Kevin Sawicki
2a0ee62685 Uppercase current word/selection with meta-u 2013-01-07 09:37:51 -08:00
Kevin Sawicki
a300146f2a Display submodule icon in tree-view 2013-01-06 09:52:53 -08:00
Kevin Sawicki
59d631879d Start substring after trailing slash 2013-01-06 08:45:07 -08:00
Kevin Sawicki
7e95bf96a5 Don't highlight ending line if it ends at column 0 2013-01-05 19:45:45 -08:00
Kevin Sawicki
f11f85e87b Show octicon for project's that are repos 2013-01-05 19:24:53 -08:00
Nathan Sobo
0624ebaf5d Set config defaults for a package from its module's configDefaults 2013-01-04 17:23:24 -07:00
Nathan Sobo
d509093076 Don't write config defaults out to config.json 2013-01-04 17:08:25 -07:00
Kevin Sawicki
e0b1570795 Only create repo from setPath 2013-01-04 15:46:12 -08:00
Nathan Sobo
8591c86733 Pass a name string to RootView.activatePackage & deactivatePackage
Previously we were relying on the package module itself to have a
`name` field. But now that we're using `atom.loadPackage` to load up
packages, we can infer the name of the module from the name of the
package directory.
2013-01-04 14:33:01 -07:00
Nathan Sobo
4ef4c79f30 Use Subscriber mixin in EditSession to subscribe/unsubscribe
This replaces the need to track subscription on `EditSession`'s 
`Buffer` and `DisplayBuffer` using an incrementing id on `EditSession`
2013-01-04 14:11:25 -07:00
Nathan Sobo
b6b8f235fd Move and rename Buffer's 'anchors-updated' event 2013-01-04 14:03:37 -07:00
Nathan Sobo
0a08d03c68 Rename Buffer, TokenizedBuffer, and Selection events 2013-01-04 13:59:11 -07:00
Nathan Sobo
1762ae2744 Rename 'selection-change' to 'selection:changed' 2013-01-04 13:48:49 -07:00
Kevin Sawicki & Nathan Sobo
96aaefdd7d Rename Project events to be past-tense 2013-01-04 13:46:27 -07:00
Kevin Sawicki & Nathan Sobo
725c4cf132 Rethrow exceptions during undo, redo, and pushOperation 2013-01-04 13:20:58 -07:00
Kevin Sawicki & Nathan Sobo
c5e6a7428d 💩 Kill stray print statement 2013-01-04 13:19:56 -07:00
Kevin Sawicki & Nathan Sobo
82d4550ff3 Throw exception when aborting/committing without a transaction 2013-01-04 13:02:56 -07:00
Kevin Sawicki & Nathan Sobo
da095cdfe9 Leave the undo stack intact when aborting empty transactions 2013-01-04 13:02:33 -07:00
Kevin Sawicki & Nathan Sobo
29f371b347 Use Editor.abort to clear autocomplete's buffer changes on cancel
Using this new `abort` mechanism ensures that autocomplete's changes can never be redone, while eliminating the need to track operation counts explicitly.
2013-01-04 12:44:44 -07:00
Kevin Sawicki & Nathan Sobo
ec13c38c7d Add EditSession.transact and friends
`EditSession.transact` adds more semantics on top of `UndoManager`'s
version pertaining to restoring selections on undo/redo of the
transaction.
2013-01-04 12:42:09 -07:00
Kevin Sawicki & Nathan Sobo
e65c2df093 Don't select first item of SelectList twice 2013-01-04 12:39:20 -07:00
Kevin Sawicki & Nathan Sobo
e64047854d Add UndoManager.abort and .commit
When `UndoManager.transact` is called with no function, you later need
to `abort` or `commit` the transaction manually. This allows
transactions to last longer than the dynamic scope of the single
function passed to `transact`.
2013-01-04 11:52:39 -07:00
Kevin Sawicki & Nathan Sobo
428900fdba Rename File 'remove' & 'move' events to passive voice
'remove' -> 'removed'
'move' -> 'moved'
2013-01-04 11:25:46 -07:00
Kevin Sawicki & Nathan Sobo
8098ee69f3 Rename Editor attach and remove events in accordance w/ new scheme
'editor-open' -> 'editor:attached'
'before-remove' -> 'editor:will-be-removed'
2013-01-04 11:25:45 -07:00
Kevin Sawicki & Nathan Sobo
8e835acea4 Rename Buffer 'will-save' event to 'will-be-saved' 2013-01-04 11:25:45 -07:00
Kevin Sawicki & Nathan Sobo
2ffc0cf13d Rename 'active-editor-path-change' to 'root-view:active-path-changed' 2013-01-04 11:25:45 -07:00
Kevin Sawicki & Nathan Sobo
0589012e86 Rename 'editor-path-change' to 'editor:path-changed' 2013-01-04 11:25:45 -07:00
Kevin Sawicki
4078046ac6 Vendor textmate bundles as submodules 2013-01-04 08:18:52 -08:00
Nathan Sobo
73b38b6b59 Passivize names remaining events triggered by EditSession 2013-01-03 18:16:19 -07:00
Nathan Sobo
fb6fe04023 Passivize more event names: 'change(d)' & 'screen-lines-change(d)' 2013-01-03 18:16:19 -07:00
Nathan Sobo
5a409dde3c Rename File and Directory 'contents-change' to 'contents-changed' 2013-01-03 18:16:19 -07:00
Nathan Sobo
a9bb4ea163 When loading a package, honor the 'keymaps' manifest in package.json
Also, add a spec to cover the loading of keymaps in `atom-spec` and
reset the `keymap`'s internal data after each spec gets run to prevent
test pollution with keymaps.
2013-01-03 15:17:09 -07:00
Kevin Sawicki
2971716060 Always use Git instance from project
This removes the need to open a new repository
each time a directory-view or file-view is displayed
and also when a status-bar is displayed for a buffer.
2013-01-02 17:21:42 -08:00
Kevin Sawicki & Nathan Sobo
c765ec80a1 Load stylesheets from package stylesheets directory 2013-01-02 16:40:30 -08:00
Kevin Sawicki & Nathan Sobo
bcde77dd0e Load keymaps from cson
All existing .coffee keymaps are now .cson and package
keymaps are now located in a keymaps folder at the root of
the package.
2013-01-02 16:10:46 -08:00
Nathan Sobo
f4f3002e6d Rename Cursor and CursorView events to passive-voice scheme
Any events emitted from DOM nodes should be prefixed with an identifier
for the node that emits them. This eliminates the possibility of ambiguity
when the events bubble up the DOM away from their emitter.
2013-01-02 13:48:11 -07:00
Nathan Sobo
0f59f5f58a Rename config "update" event to "updated" 2013-01-02 13:48:10 -07:00
Nathan Sobo
6d9402b5c9 Rename Anchor and Buffer events to passive-voice scheme 2013-01-02 13:48:10 -07:00
Nathan Sobo
bce5104d15 Delete dead code 2013-01-02 04:23:48 -07:00
Nathan Sobo
bb710d0ae0 Buffer.save only writes to disk if the buffer is modified
This prevents autosave from writing unmodified buffers to disk, which
was causing the tree view to rebuild directory contents based on the
write event just when switching tabs.
2013-01-02 04:23:03 -07:00
Nathan Sobo
de21db0ea8 Simplify Editor subscriptions
We no longer subscribe to `RootView` so we don't need to unsubscribe.
We can use `@subscribe` to subscribe to window, so we don't need to
genette a unique id for the editor in order to unsubscribe, because the
editor will unsubscribe automatically when removed now.
2013-01-02 03:22:16 -07:00