Commit Graph

1863 Commits

Author SHA1 Message Date
Nathan Sobo
1b1d8b0390 Merge remote-tracking branch 'origin/master' into cson-snippets 2013-01-07 21:53:36 -07:00
Kevin Sawicki
ebe7ff7090 Destroy inactive editor sessions that are dirty
A confirm dialog is now displayed whenever a session
with a dirty buffer is closed so dirty sessions can now
be processed when 'editor:close-other-tabs' is fired.
2013-01-07 16:50:20 -08:00
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
f008ff52e8 Load snippets from any atom package with a snippets directory 2013-01-07 14:28:47 -07: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
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
7e95bf96a5 Don't highlight ending line if it ends at column 0 2013-01-05 19:45:45 -08:00
Nathan Sobo
af3d3bf4cc 💩 Reset fs.write mock before test. 2013-01-04 18:08:52 -07: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
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
0a08d03c68 Rename Buffer, TokenizedBuffer, and Selection events 2013-01-04 13:59:11 -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
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
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
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
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 & Nathan Sobo
c765ec80a1 Load stylesheets from package stylesheets directory 2013-01-02 16:40:30 -08:00
Nathan Sobo
6d9402b5c9 Rename Anchor and Buffer events to passive-voice scheme 2013-01-02 13:48:10 -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
08a27cf93d Load grammars from TextMatePackage. Delete TextMateBundle.
TextMatePackage is only designed to load resources out of a TextMate
bundle. It's used only at load time, and from that point out we only
refer to our own global `syntax` data structure to access the data that
it loads.
2012-12-31 18:28:38 -06:00
Nathan Sobo
188d8f8604 Store grammars on the syntax global 2012-12-31 18:26:58 -06:00
Nathan Sobo
e3bbea3397 Fix spec now that Theme.load returns a theme instead of an array 2012-12-31 14:26:22 -06:00
Nathan Sobo
2d73aa292d Make theme loading more similar to package loading
These changes are mostly aesthetic in nature. I just thought it would 
be a good idea to have theme loading be parallel to package loading as
much as possible. So I localized more logic on the `atom` global.
2012-12-31 14:18:45 -06:00
Nathan Sobo
bb913ef9e8 Merge branch 'config' 2012-12-31 12:43:25 -06:00
Jon Rohan
92a9831201 writing spec for .backspaceToBeginningOfLine() 2012-12-28 17:24:57 -08:00
Kevin Sawicki
296138b558 Don't show eol invisible in mini editors 2012-12-28 13:56:44 -08:00
Kevin Sawicki
acf5aeb884 Cancel select list when an empty selection is confirmed 2012-12-28 13:49:13 -08:00
Nathan Sobo
bb4f3c4efa Store foldEndPattern in syntax global's scoped properties
There's a slight wrinkle in this commit… TextMate grammars sometimes store
the `foldStopMarker` directly in the grammar, rather than storing it
in a separate scoped preferences file like the other settings. So we
have to scan through grammars looking for those that have the fold end
marker and make a scoped property for that grammar's scope.
2012-12-28 14:46:39 -06:00
Nathan Sobo
ea322d5895 Un-F 2012-12-27 20:17:53 -06:00
Corey Johnson
4a6d336763 Theme.load can take multiple theme names 2012-12-27 16:13:53 -08:00
Corey Johnson
82abbaa71c Break AtomTheme out into its own file. 2012-12-27 15:25:16 -08:00
Corey Johnson
0d946078c9 Atom Themes can be loaded 2012-12-27 14:31:13 -08:00
Corey Johnson
d509507b0c TextMateTheme extend Theme 2012-12-27 12:12:58 -08:00
Corey Johnson
d77fc88ff4 Merge remote-tracking branch 'origin/master' into config 2012-12-27 10:38:24 -08:00
Kevin Sawicki
e941459ca7 Register click past last line handler on underlayer 2012-12-27 08:26:32 -08:00