Corey Johnson & Nathan Sobo
69d059d24c
Make TreeView.moveDown work for nested/empty directories
...
If the selected entry is the last entry in a directory that *itself* is the last entry of its parent, we need to search upward through our ancestors for the first directory that has a following sibling entry. Also, if the directory is empty, the attempt to select its first element will fail, so we need to search for a next sibling as well.
2012-07-27 21:27:55 -06:00
Nathan Sobo
334ba6ba82
Ctrl-meta-1 reveals the active file in the tree view
2012-07-26 14:10:02 -06:00
Nathan Sobo
8b743b90a2
Bugfix: Don't clear selections after running an x command w/ no matches
...
Operations now return a range to select rather than actually performing a selection in `execute`. This allows the composite command to aggregate all ranges to select and only change the selection if it's non empty. Before we had to clear the selections ahead of time and then rely on each operation to imperatively add its selection. This is easier to control. It also ensures that when we execute a previewed operation, we don't add a selection but instead change the selection.
2012-07-26 11:53:03 -06:00
Nathan Sobo
dcc1193b49
Preserve focus state of command panel's mini-editor on refresh
2012-07-26 11:26:38 -06:00
Nathan Sobo
786c9dd8c8
Merge branch 'master' of github.com:github/atom
2012-07-26 10:09:38 -06:00
Nathan Sobo
54616aee78
Bugfix: When the command panel makes a selection, it destroys surrounding folds
2012-07-26 10:09:28 -06:00
Nathan Sobo
f2fa9793b1
Remove logging
2012-07-26 10:08:16 -06:00
Corey Johnson
1fad6ad869
fixed :probablycorey:'s :shit:show
2012-07-25 15:58:22 -07:00
Corey Johnson
470e8a6191
Add rootView.deactivateExtension
2012-07-25 15:45:21 -07:00
Corey Johnson
d737199299
Deactivate the root whew instead of deactivating the tree view
2012-07-25 15:16:13 -07:00
Corey Johnson
c91e28071a
Add deactivate to TreeView
2012-07-25 15:16:13 -07:00
Corey Johnson
70dfdc6cdd
a TreeView without a root path can be serialized
2012-07-25 15:16:13 -07:00
Nathan Sobo
1886b2a48e
Merge branch 'master' of github.com:github/atom into global-find
...
Conflicts:
spec/app/buffer-spec.coffee
spec/extensions/command-panel-spec.coffee
spec/extensions/tree-view-spec.coffee
src/app/buffer.coffee
src/extensions/command-panel/command-panel.coffee
src/extensions/command-panel/keymap.coffee
2012-07-25 13:38:12 -06:00
Nathan Sobo
7270758a9e
Focus the active editor after executing a previewed operation
2012-07-25 13:26:57 -06:00
Nathan Sobo
454557b502
Merge branch 'master' into global-find
...
Conflicts:
spec/extensions/command-panel-spec.coffee
src/app/buffer.coffee
src/extensions/command-panel/command-panel.coffee
src/extensions/command-panel/keymap.coffee
2012-07-24 17:59:49 -06:00
Nathan Sobo
c493272be1
Fix click behavior when the event target is a child of the li instead of the li
2012-07-23 20:12:06 -06:00
Nathan Sobo
da7e1b0509
Meta-w on the preview list closes the command panel, not the entire window
2012-07-23 19:32:46 -06:00
Nathan Sobo
a2522f9b19
Clicking on previewed operations selects their buffer range in active editor
2012-07-23 19:25:29 -06:00
Nathan Sobo
5659f9bab1
Destroy preview list's previous operations when populating new ones
2012-07-23 19:05:37 -06:00
Nathan Sobo
c3c4e07a3f
Pressing 'enter' on a global search operation selects it in the active editor
2012-07-23 18:16:37 -06:00
Corey Johnson & Nathan Sobo
7962c8ff34
When a file is moved (via the fs) associated File objects update their path and trigger a 'move' event
2012-07-23 16:35:24 -07:00
Nathan Sobo
8f0c8633f8
Move-up / move-down on command panel change the selected operation
2012-07-23 15:01:03 -06:00
Nathan Sobo
c1c055319c
Remove redundant describe block
...
This is now tested via pressing enter on the mini-editor
2012-07-23 13:17:42 -06:00
Nathan Sobo
9d938d84ad
Test the 'command-panel:focus-preview' event directly
...
This is more tidy, breaking out all the cases into a describe hierarchy. The previous test was kinda tacked on in an odd spot.
2012-07-23 12:59:06 -06:00
Nathan Sobo
318ddd8148
Ctrl-2 & ctrl-0 mediate visibility focus of command-panel and the preview list
...
If the command panel is toggled with ctrl-2, then the preview list will show and become focused. If it's toggled with ctrl-0, the preview list won't be shown. But if it's already showing, focus will just switch to the editor, leaving it visible. It's kind of hard to explain but feels intuitive to me to use.
2012-07-23 12:19:54 -06:00
Nathan Sobo
a0e3ce5f1c
Merge branch 'master' into global-find
...
Conflicts:
spec/extensions/command-panel-spec.coffee
2012-07-23 11:33:26 -06:00
Nathan Sobo
ab47df1987
Make command-panel sticky like tree view is (fit into the "tool panel" scheme)
...
Esc on the command panel just moves focus back to the editor. Ctrl-0 will move focus back to the panel if it is open but not focused.
2012-07-23 11:29:52 -06:00
Nathan Sobo
1f5416f5dd
Merge branch 'master' into global-find
...
Conflicts:
spec/extensions/command-panel-spec.coffee
2012-07-20 19:09:28 -06:00
Nathan Sobo
091b47a5d3
Merge branch 'global-find' of github.com:github/atom into global-find
2012-07-20 19:07:46 -06:00
Nathan Sobo
dbfc9d20f7
Fix broken specs due to keybindings change
2012-07-20 19:07:00 -06:00
Nathan Sobo
89e3f729f5
Un-F 💩
2012-07-20 19:06:48 -06:00
Nathan Sobo
c05fa7dc6f
Merge branch 'master' into global-find
...
Conflicts:
src/app/buffer.coffee
2012-07-20 19:01:38 -06:00
Nathan Sobo
e8a892ee3e
Start implementing "tool-panel" keymap scheme
...
Tool panels will be mapped to ctrl-# bindings. If the panel is focused, the # binding closes it. Otherwise the # binding shows it (if needed) and focuses it. The esc key unfocuses the panel, but does not necessarily close it. Meta-w always closes the panel.
This is the scheme. Right now we only have 2 panels:
Command Panel: Ctrl-0, esc still hides it
Tree View: Ctrl-1, esc just unfocuses it
2012-07-20 17:56:36 -06:00
Corey Johnson & Nathan Sobo
cc292b604d
Select preview item when preview list is shown
2012-07-20 14:19:19 -07:00
Nathan Sobo
d16328c533
Meta-shift-f opens the command panel pre-populated with Xx/ to find in project
2012-07-20 13:57:33 -06:00
Nathan Sobo
73654a5e3f
Improve command panel meta-f spec
2012-07-20 13:56:55 -06:00
Nathan Sobo
411215f6c8
Fix bug where cursor occasionally precedes '/' after pressing meta-f
...
Now we always move cursor to end when setting the command panel's mini-editor text.
2012-07-20 10:44:49 -06:00
Nathan Sobo
f37330a218
Fix spec to now that we don't build PreviewItems
2012-07-19 17:27:51 -06:00
Nathan Sobo
31c3cb14f0
💄
2012-07-19 09:17:52 -06:00
Corey Johnson & Nathan Sobo
4b1403724b
Ensure that evil filenames do not hose Project.scan
2012-07-18 17:53:53 -06:00
Corey Johnson & Nathan Sobo
12a576ff95
Command panel can be detached after preview without throwing an exception
2012-07-18 15:19:55 -06:00
Corey Johnson & Nathan Sobo
af62c081a1
Remove unneeded code
2012-07-18 11:54:23 -07:00
Corey Johnson & Nathan Sobo
d36873f702
Rename Project.open to Project.buildEditSessionForPath
2012-07-18 11:20:13 -07:00
Corey Johnson
52d60df272
Stylize command panel preview
2012-07-18 09:22:32 -07:00
Corey Johnson
bd9cbde54c
More specific tests for command panel previews
2012-07-17 20:12:21 -07:00
Corey Johnson & Nathan Sobo
faea4aedcc
Show preview list when X x operation completes
2012-07-17 18:39:29 -06:00
Nathan Sobo
dcb8fd71e0
Convert a command panel spec to integration-style to prepare for command preview
2012-07-17 17:03:19 -06:00
Nathan Sobo
0bc9973d9f
Don't set the ':' prompt font in command panel because it looks bad afterward
2012-07-17 16:54:29 -06:00
Nathan Sobo
d8189a6fc4
"X x/regex/" command returns operations
...
Also, passing an EditSession is optional when calling CommandInterpreter.eval. X commands don't require it, but other commands will throw exceptions if it's missing.
2012-07-17 16:32:20 -06:00
Corey Johnson & Nathan Sobo
34e96fb8d7
WIP: Adding find all matches in project command
2012-07-17 14:26:12 -06:00