Commit Graph

2799 Commits

Author SHA1 Message Date
Nathan Sobo
c3c4e07a3f Pressing 'enter' on a global search operation selects it in the active editor 2012-07-23 18:16:37 -06: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
7f5c588723 Statically link the silver searcher binary against PCRE so it isn't required 2012-07-21 17:21:49 -06:00
Nathan Sobo
4f401b2ada 💄 2012-07-20 19:11:40 -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
830935cdb8 Kill old TreeView bindings. Ctrl-1 is king. 2012-07-20 18:59:44 -06:00
Nathan Sobo
fe9a82b5b8 Merge branch 'master' of github.com:github/atom 2012-07-20 17:56:47 -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
Corey Johnson & Nathan Sobo
713b5a9620 Better $native.exec errors 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
Corey Johnson & Nathan Sobo
b27a793b92 Fix bug in Project.scan that was getting the state machine into a bad state
Chunks of stdout data are being buffered by lines. But then we were splitting these chunks on \n and the last fragment was therefore always "". This caused problems. Still need to test this.
2012-07-19 19:17:31 -06:00
Corey Johnson & Nathan Sobo
d24f9667f8 Add exception warning to stdout handler of native child process exec 2012-07-19 19:14:05 -06:00
Corey Johnson & Nathan Sobo
ea385dad4b Don't swallow all command panel errors as if they were SyntaxErrors
This wasn't our fault. SyntaxError's implementation is weird and so every error ends up being an instance of it. Boo.
2012-07-19 19:13:28 -06:00
Nathan Sobo
239cba25e4 Use the silver searcher to implement global search
Parsing uses a simple state machine in `Project.scan`.
2012-07-19 17:28:46 -06:00
Nathan Sobo
f37330a218 Fix spec to now that we don't build PreviewItems 2012-07-19 17:27:51 -06:00
Corey Johnson & Nathan Sobo
9e4f401485 WIP: trying to make preview faster 2012-07-19 11:28:41 -06:00
Corey Johnson & Nathan Sobo
f0417e7287 Ensure that Project.scan handles evil file fixtures correctly 2012-07-19 11:15:08 -06:00
Corey Johnson & Nathan Sobo
12f765cc47 💄 2012-07-19 11:14:38 -06:00
Corey Johnson & Nathan Sobo
b1b6b3a310 Convert NSString to std::string with a length appropriate to the UTF8 encoding 2012-07-19 11:14:25 -06:00
Corey Johnson & Nathan Sobo
7a85e07cf1 Project.scan handles paths with newlines 2012-07-19 10:27:42 -06:00
Nathan Sobo
a61064eeeb Throw an exception when creating a File object for a path that isn't a file
This exception is getting thrown inside of `Project.scan` when it incorrectly parses a path with newlines in it. But the exception gets swallowed by ChildProcess.exec. At least it prevents a file from being created that we don't end up unsubscribing from. But `Project.scan` needs to be improved.
2012-07-19 09:20:45 -06:00
Nathan Sobo
31c3cb14f0 💄 2012-07-19 09:17:52 -06:00
Nathan Sobo
f5e46e57fc Use bundled ack instead of grep
Our ack is slightly modified to use `'\0'` characters instead of `':'` in the --nogroup listing. This makes it easier to handle both `':'` characters and newlines in filenames, but we aren't really doing that yet.
2012-07-19 09:17:44 -06:00
Corey Johnson & Nathan Sobo
8534df28d5 Another attempt with find/grep/perl/xargs that doesn't work 2012-07-18 18:04:39 -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
b959d5aa37 Buffers are memoized on project by path 2012-07-18 12:56:09 -07:00
Corey Johnson & Nathan Sobo
72750fd4a2 RootView.getEditors() only returns editors that are direct descendants of a pane 2012-07-18 12:45:28 -07: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 & Nathan Sobo
522149c84d Project.scan excludes ignored directories 2012-07-18 11:06:13 -07:00
Corey Johnson
9f004ad09c retain and release methods return this 2012-07-18 10:40:34 -07:00
Corey Johnson
52d60df272 Stylize command panel preview 2012-07-18 09:22:32 -07:00
Corey Johnson
86b0fee4f1 Make spec pass by using code that is not horribly written 2012-07-17 20:18:00 -07:00
Corey Johnson
a5032e3811 PreviewItem displays matched text 2012-07-17 20:12:57 -07:00
Corey Johnson
bd9cbde54c More specific tests for command panel previews 2012-07-17 20:12:21 -07:00
Corey Johnson
51b7b50687 Operations are initialized with the project 2012-07-17 20:11:43 -07:00
Corey Johnson & Nathan Sobo
faea4aedcc Show preview list when X x operation completes 2012-07-17 18:39:29 -06:00
Corey Johnson & Nathan Sobo
f998da301c Native handler logs when completion callback for child process raises exception 2012-07-17 18:39:00 -06:00