Commit Graph

1465 Commits

Author SHA1 Message Date
Corey Johnson & Nathan Sobo
fbdebd644d Revert "Handle patterns that include other patterns from the grammar repository"
This reverts commit 64795c032306200f05ce3b262fe58adc86e06b34.
2012-08-01 09:48:40 -07:00
Corey Johnson & Nathan Sobo
62c5da760c Handle patterns that include other patterns from the grammar repository 2012-08-01 09:48:40 -07:00
Corey Johnson & Nathan Sobo
6af22fce67 Add specs for begin/end patterns with nested patterns. 2012-08-01 09:48:39 -07:00
Corey Johnson & Nathan Sobo
aa02785d67 Parser handles patterns w/ begin/end regexes (if begin/end are on the same line) 2012-08-01 09:48:38 -07:00
Nathan Sobo
7682f586be Parser can tokenize lines containing simple tokens (no nested scopes yet) 2012-08-01 09:48:37 -07:00
Corey Johnson & Nathan Sobo
a2a58a3506 TextMate parser can parse single plain tokens / tokens with captures 2012-08-01 09:48:37 -07:00
Corey Johnson & Nathan Sobo
757258dd98 Include 'indices' property on OnigRegExp result with capture group indices 2012-08-01 09:48:37 -07:00
Corey Johnson & Nathan Sobo
7067c35dc0 Add CocoaOniguruma 2012-08-01 09:48:36 -07:00
Corey Johnson & Nathan Sobo
c6bae093c1 Starting on TextMate bundle support 2012-08-01 09:48:35 -07:00
Corey Johnson & Nathan Sobo
a589557aaa Ignore bracket matching when there are multiple cursors 2012-08-01 09:47:12 -07:00
Corey Johnson & Nathan Sobo
97b492edfc When an identical closing bracket is inserted, don't insert a new character and move cursor to the right. 2012-08-01 09:33:42 -07:00
Corey Johnson & Nathan Sobo
3a5e73aa77 Merge branch 'making-folding-better' 2012-07-30 13:43:47 -07:00
Corey Johnson & Nathan Sobo
f7614c210a Add unfold-all and bind it to ctrl-} 2012-07-30 12:11:54 -07:00
Corey Johnson & Nathan Sobo
a7db67e68d When DisplayBuffer.foldBufferRow is called with a buffer row that is within a fold, it folds the scope that incloses the buffer row's fold 2012-07-30 11:46:43 -07:00
Corey Johnson & Nathan Sobo
9622d6f9b3 Rename un/foldScopeContainingBufferRow to un/foldBufferRow.
Scope containing buffer row was a misnomer. Waiting until I implement the repeat folding feature before considering a better name.
2012-07-30 10:25:53 -07:00
Corey Johnson & Nathan Sobo
75f0438f6a Rename fold/unfold to foldCurrentRow/unfoldCurrentRow 2012-07-30 09:58:15 -07:00
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
Corey Johnson
69d7ff0a55 add unfold to display buffer 2012-07-27 16:05:56 -07:00
Corey Johnson
7ff31d1ad7 Remove toggleFold and replace with fold 2012-07-27 13:46:50 -07:00
Corey Johnson
76ffa5a2c5 change toggle-fold to fold 2012-07-27 13:45:13 -07:00
Nathan Sobo
dc662ed071 When ( [ { ' or " is inserted, insert the matching character after the cursor 2012-07-27 13:08:43 -06:00
Nathan Sobo
87f4d8c6e9 Upon inserting '(', insert matching ')' character after cursor 2012-07-27 13:02:26 -06:00
Nathan Sobo
d0d5cb534f Merge branch 'master' of github.com:github/atom 2012-07-27 12:30:17 -06:00
Nathan Sobo
3516dea210 Introduce LanguageMode wrapper for Ace modes as a foundation of our own modes
LanguageMode is the central point for all language-specific behavior associated with an EditSession. There is one LanguageMode instance per EditSession. LanguageMode has access to the EditSession and its TokenizedBuffer, and in reverse the EditSession, DisplayBuffer, and TokenizedBuffer also make use of LanguageMode. This is a bit incestuous, but I think it's okay because you can think of LanguageMode as a swappable strategy object that governs language-specific aspects of that constellation of objects.
2012-07-27 12:30:06 -06:00
Corey Johnson
20ff70115f Fix bug in failing editor spec 2012-07-27 11:11:45 -07:00
Nathan Sobo
79893d96b6 Merge commit '0384f025dd6915d2d9771e37983dc839e49b28f7' 2012-07-26 14:11:29 -06:00
Nathan Sobo
334ba6ba82 Ctrl-meta-1 reveals the active file in the tree view 2012-07-26 14:10:02 -06:00
Corey Johnson
42299c6a71 When the active edit session is modified, and its file is then modified by the file system, it displays an alert. 2012-07-26 10:59:58 -07: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
252a1a4d5f 💄 2012-07-26 10:29:42 -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 💩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
Corey Johnson
e491fe7bb7 Clean up after tests 2012-07-24 10:52:42 -07:00
Corey Johnson & Nathan Sobo
239fd2f9e6 buffer triggers a 'path-change' event when a file is moved or removed 2012-07-24 10:34:30 -07:00
Nathan Sobo
66f80c2dd8 Backfill coverage for handling of breaks in Project.scan subprocess output
If the stdout callback is fired with partial data, and it ends right after a path, we need to ensure we don't handle it as if there's an extra newline.
2012-07-24 10:07:07 -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
9658cf61ff Buffer.getPath() returns null when the buffer's file is deleted on disk 2012-07-23 16:35:24 -07:00
Corey Johnson & Nathan Sobo
8d82f3125f When a file is deleted, associated Files trigger the 'remove' event 2012-07-23 16:35:24 -07: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
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
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
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
f0417e7287 Ensure that Project.scan handles evil file fixtures correctly 2012-07-19 11:15:08 -06:00
Corey Johnson & Nathan Sobo
7a85e07cf1 Project.scan handles paths with newlines 2012-07-19 10:27:42 -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
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
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
Nathan Sobo
4b147c04e5 RootView.proto.open returns the opened edit session 2012-07-17 14:44:04 -06:00
Corey Johnson & Nathan Sobo
126bdc1138 💄 2012-07-17 14:26:20 -06:00
Corey Johnson & Nathan Sobo
34e96fb8d7 WIP: Adding find all matches in project command 2012-07-17 14:26:12 -06:00
Corey Johnson & Nathan Sobo
c3fe9aa0b3 Implement refcounting scheme on Buffer 2012-07-17 14:24:33 -06:00
Nathan Sobo
330e9cebd9 Make it possible for command compilation to be async by returning promises 2012-07-17 12:02:45 -06:00
Nathan Sobo
1d21de1e83 Merge cursors after buffer changes that didn't occur via the EditSession
The buffer now emits a new event 'update-anchors-after-change' to signal that all the anchors have been updated, which is an appropriate time to merge cursors.
2012-07-17 10:38:01 -06:00
Corey Johnson
5914b6cc2a Add Buffer.reload() 2012-07-16 16:12:09 -07:00
Corey Johnson
611eb93219 Buffer stores a is modified on disk flag 2012-07-16 16:11:52 -07:00
Nathan Sobo
512c1bfdb9 Merge branch 'master' into global-find 2012-07-16 14:56:24 -06:00
Corey Johnson
ac04a8ed66 Allow additional indentation after line has been auto-indented 2012-07-16 10:55:44 -07:00
Corey Johnson
95c3ea1b74 Rename insert tab event to indent 2012-07-16 10:34:02 -07:00
Corey Johnson
453af489d9 un-log 💩 2012-07-16 10:28:52 -07:00
Corey Johnson
5184b90365 Hitting tab on a line (containing only whitespace) will auto indent the line and set the cursor to the end 2012-07-16 10:25:28 -07:00
Corey Johnson
3e3bc99161 Merge branch 'master' into global-find
Conflicts:
	spec/app/editor-spec.coffee
2012-07-16 09:16:07 -07:00
Corey Johnson
e089b74867 Editor.renderedLines' css width is set to 100% when editor.maxScreenLineLength() is less than Editor.scrollView's width 2012-07-16 09:14:33 -07:00
Nathan Sobo
1ac6581f33 EditSession.setSelectedBufferRanges recycles selection instances
This prevents changing the scroll position when it isn't necessary.
2012-07-15 17:32:30 -06:00
Nathan Sobo
075968e42c Associate compiled operations with anchor ranges. All tests pass again.
This allows them to update their target range in the face of upstream changes.
2012-07-13 19:46:08 -06:00
Corey Johnson & Nathan Sobo
fd24b82d47 WIP: Converting to operations, but substitution operations need anchor ranges 2012-07-13 18:30:10 -06:00
Corey Johnson & Nathan Sobo
926067164d Buffer updates anchors when it changes instead of EditSession 2012-07-13 17:42:41 -06:00
Corey Johnson & Nathan Sobo
c7b7135388 Temporary fix: When editor is resized, adjust width of rendered lines.
We do this to ensure that the lines aren't longer than the scroll view if they don't have to be. We really should use min-width instead because it's automatic. Also, trigger window resize when we make the editor narrower.
2012-07-13 17:17:18 -06:00
Corey Johnson & Nathan Sobo
e15f2204c7 Merge branch 'global-find' of github.com:github/atom into global-find 2012-07-13 15:12:41 -06:00
Corey Johnson & Nathan Sobo
42f322a112 CommandInterpreter uses project and edit sessions instead of editor to execute
We don't want to pass view objects into it!
2012-07-13 15:10:37 -06:00
Corey Johnson
b9d4270693 Merge branch 'master' into global-find 2012-07-13 09:36:21 -07:00
Corey Johnson
9dfa7d9439 When splitting an editor only the active edit session is copied to the new editor. 2012-07-13 09:24:14 -07:00
Corey Johnson & Nathan Sobo
d44c648d4b Editor.renderedLines' width is set to the maximum of either Editor.scrollView's width or the maximum rendered line width 2012-07-13 09:05:38 -07:00
Nathan Sobo
a4db677979 Implement setSelectedBufferRange w/ setSelectedBufferRanges
Also add the preserveFolds option, which doesn't destroy folds containing the selected ranges – mainly for specs right now
2012-07-12 18:57:12 -06:00
Nathan Sobo
f99146b42f EditSession.setSelectedBufferRanges destroys folds
It also clears all existing selections and makes new ones.
2012-07-12 18:40:34 -06:00
Corey Johnson & Nathan Sobo
8e3c3a13a9 Substitution commands don't change editor selection 2012-07-12 17:59:45 -06:00
Corey Johnson & Nathan Sobo
47a9d1284a Reject exec promise with hash instead of string 2012-07-12 12:18:53 -07:00
Corey Johnson & Nathan Sobo
e59d15868d un-f 2012-07-12 12:18:24 -07:00
Corey Johnson & Nathan Sobo
86adf09267 Test that project scan executes callback with match data 2012-07-12 12:12:44 -07:00
Corey Johnson & Nathan Sobo
ded4ac7fa1 WaitsForPromise outputs reject callback arguments 2012-07-12 12:11:48 -07:00
Corey Johnson & Nathan Sobo
1331cfb749 When promise resolution throws an exception, waitsForPromise is halted 2012-07-12 11:45:44 -07:00
Corey Johnson & Nathan Sobo
0d50066dad Add window.originalSetTimeout
Signed-off-by: Corey Johnson & Nathan Sobo <cj+nathan@github.com>
2012-07-12 11:44:07 -07:00
Corey Johnson
ba2e85a548 :lipstick 2012-07-12 10:13:14 -07:00
Corey Johnson & Nathan Sobo
d2d6efdcb5 Project.scan invokes the callback with matches 2012-07-12 11:12:31 -06:00
Corey Johnson & Nathan Sobo
76d71c82d0 waitsForPromise takes a expectRejection option
If we expect rejection, we expect the promises's `fail` callback to be invoked and throw an exception if it isn't. Vice versa is also true.
2012-07-12 11:11:09 -06:00
Nathan Sobo
3854f73c84 WIP: Start on Project.prototype.scan
Right now it calls out to grep and parses the output, but doesn't do anything with it just yet.
2012-07-11 18:50:38 -06:00
Nathan Sobo
8f5746c8fe Add bufferLines option to ChildProcess.exec
It ensures that stdout and stderr callbacks are triggered with whole lines
2012-07-11 16:30:50 -06:00
Corey Johnson
2afec5cf53 Add ChildProcess.exec(cmd, [options])
Uses promises for failure and success states. Takes optional stderr and stdout callbacks for incremental reading.
2012-07-10 15:07:28 -07:00
Corey Johnson
5b2781aec2 waitsForPromise can wait for calls to fail 2012-07-10 15:05:29 -07:00
Corey Johnson & Nathan Sobo
478a334b73 Redoing a snippet expansion restores tab stops to the *current* edit session 2012-07-06 12:12:14 -07:00
Corey Johnson & Nathan Sobo
d6912c5913 When a snippet expansion is redone, tab stops are restored 2012-07-06 11:50:42 -07:00
Corey Johnson & Nathan Sobo
9f9c636883 When snippet expansion is undone, the snippet is destroyed
This is still in progress. You can't *redo* snippet expansion and restore tab stops. Also, this commit performs all changes associated with snippet expansion in a transaction.
2012-07-06 12:10:14 -06:00
Corey Johnson & Nathan Sobo
6177b46cf9 Restore selection on active edit session when undoing/redoing
The `do`, `undo`, and `redo` methods on operations take an optional editSession argument, which can be used to determine the context in which they are being run. We restore selections on that edit session instead of the session where the operations originally occurred.
2012-07-06 11:42:07 -06:00
Nathan Sobo
53d6c4960a Fix specs that broke due to no subscription on Buffer from UndoManager 2012-07-05 20:06:09 -06:00
Nathan Sobo
42eefb49a9 Add UndoManager.prototype.transact
The `transact` method takes a function and batches all operations within that function as a single transaction to be undone and redone. The edit session now uses generic operations to restore selection state around transactions. The `undo` and `do` methods on operations are now optional. In addition, the undo manager now supports an optional `redo` method on an operation for code that should *only* be run on redo, and not when the operation is initially pushed. This is used by edit session to restore selection state after redo.
2012-07-05 20:04:16 -06:00
David Graham & Nathan Sobo
6fbd019b1d Pull out a BufferChangeOperation, which Buffer.change sends to UndoManager 2012-07-05 19:07:12 -06:00
David Graham & Nathan Sobo
45a45bcbc8 Disable failing snippets spec for now 2012-07-05 17:17:42 -06:00
Nathan Sobo
d53be3b28d Add failing spec demonstrating inability to undo snippet expansion 2012-07-05 16:41:37 -06:00
Nathan Sobo
569359b687 Don't destroy selection/cursor anchors when encompassed by a change
Add the 'strong' option to anchors. If anchors are 'strong' instead of being destroyed by encompassing changes they move to the beginning of the change range.
2012-07-05 15:20:28 -06:00
Nathan Sobo
60a4f23c50 Anchors are destroyed when encompassed by a buffer change 2012-07-05 14:53:37 -06:00
Nathan Sobo
f253820250 💄 Use more delegated (editor -> buffer) methods 2012-07-04 12:58:00 -06:00
Nathan Sobo
43f51b9689 💄 Replace editor.getBuffer().setText(…) w/ editor.setText(…) 2012-07-04 12:45:06 -06:00
Nathan Sobo
b254fa39d9 💄 Replace editor.getBuffer().getText() w/ editor.getText() 2012-07-04 12:41:51 -06:00
Nathan Sobo
6d7a6f9a92 💄 Replace editor.getBuffer().getPath() w/ editor.getPath() 2012-07-04 12:40:17 -06:00
Nathan Sobo
39ce15c3fa Merge branch 'master' of github.com:github/atom 2012-07-04 12:34:56 -06:00
Nathan Sobo
c90c2e80d6 Replace @buffer reference on Editor with @getBuffer method 2012-07-04 12:34:44 -06:00
Nathan Sobo
fb6aa46531 Editor subscribes to buffer-path-change events on edit sessions, not buffers directly 2012-07-04 12:05:09 -06:00
Corey Johnson
3aaa8ad8f0 TreeView's add and move create intermediate directories as needed 2012-07-03 15:34:34 -07:00
Corey Johnson
4cf4456635 Add fs.makeTree 2012-07-03 14:46:45 -07:00
Corey Johnson
fc660c2790 Add fs.split 2012-07-03 14:44:41 -07:00
Corey Johnson
33813d0c42 💄 2012-07-03 14:44:05 -07:00
Corey Johnson
08b0a686ed fs.directory returns empty string if path has no parent directory 2012-07-03 14:43:56 -07:00
Corey Johnson
e36b5521bd When testing keybindings, use window.requireExtension instead of rootView.activateExtension 2012-07-03 13:44:06 -07:00
Corey Johnson & Nathan Sobo
b96bd29ef5 Move extensions with more than one file into folders 2012-07-03 11:22:08 -07:00
Corey Johnson & Nathan Sobo
ec510c5372 Remove commented out lines 2012-07-03 10:23:24 -07:00
Nathan Sobo
bdfdf08ea0 Adjust Editor.scrollTop when removing a line reduces the scroll height
This eliminates rendering artifacts and jerky scrolling at the bottom of the screen
2012-07-03 11:12:54 -06:00
Nathan Sobo
3ee7c0dc0f "Scroll" gutter by relatively positioning its line numbers
This matches how we scroll lines, and eliminates opportunities for the gutter to get out of sync with the lines. If that happened, it would probably be a bug, but this at least eliminates one source of confusion when debugging.
2012-07-03 11:09:34 -06:00
Nathan Sobo
9cae4d3d8f Rename RootView.editors -> getEditors 2012-07-02 19:47:38 -06:00
Nathan Sobo
bd5c1f8694 Rename RootView.activeEditor -> getActiveEditor 2012-07-02 19:46:33 -06:00
Nathan Sobo
a38042f89f Rename Editor.removeActiveEditSession -> destroyActiveEditSession 2012-07-02 19:44:24 -06:00
Nathan Sobo
8fbbd77a23 Commands terminating in a substitution restore their initial selection 2012-07-02 19:35:14 -06:00
Nathan Sobo
81530761ba Merge branch 'master' of github.com:github/atom 2012-07-02 19:22:24 -06:00
Nathan Sobo
06cdcaa820 Use fs.md5ForPath in spec-helpert o ensure sample.js isn't modified 2012-07-02 19:21:24 -06:00
Corey Johnson & Nathan Sobo
b59bd4bc7b Saving a buffer does not trigger a "contents-change" event 2012-07-02 17:48:30 -07:00
Corey Johnson & Nathan Sobo
6ebe75c0bd Add fs.md5ForPath 2012-07-02 18:19:16 -06:00
Nathan Sobo
8c740b09e6 Add fs.lastModified 2012-07-02 17:44:12 -06:00
Nathan Sobo
7387ad13f6 Merge branch 'master' of https://github.com/github/atom 2012-07-02 13:13:51 -06:00
Nathan Sobo
6b3180e144 Ensure path is present before building a Buffer with it in spec 2012-07-02 13:13:25 -06:00
Corey Johnson
10bfc56624 When a Buffer is created, the initial call to setText is not treated as an undoable change. 2012-07-02 11:39:22 -07:00
Corey Johnson
ae34611d2a Changes to buffer (via external process) do set buffer as modified. 2012-07-02 09:13:05 -07:00
Corey Johnson
801a91ec9b Specs cleanup buffers 2012-06-29 15:38:12 -07:00
Corey Johnson
2ff1cc9baf Never again will changes to 'sample.js' bite us in the ass 2012-06-29 15:09:31 -07:00
Corey Johnson
c3d7d3566f Buffer listens for changes to file and triggers 'contents-change' event 2012-06-29 15:09:31 -07:00
Corey Johnson
e295d19d51 Editor.prototype.removeActiveEditSession calls destroy on the removed edit session 2012-06-29 15:09:01 -07:00
Corey Johnson
3dd9253bc5 When Buffer's path changes, stop listening for events on former path 2012-06-29 15:09:01 -07:00
Corey Johnson
8e7a8836cd Unmodified buffer updates contents when file changes outside of atom. 2012-06-29 15:09:01 -07:00
Corey Johnson
6182cf4736 un-f and un-console 2012-06-29 15:09:01 -07:00
Corey Johnson
e24c9932a4 Files trigger contents-change event 2012-06-29 15:09:01 -07:00
Nathan Sobo
3524490946 Ensure selection emits event if a buffer change moves its anchor 2012-06-29 11:55:16 -06:00
Nathan Sobo
f9db74a2bd Add spec for clicking paths in file finder 2012-06-29 11:03:08 -06:00
Nathan Sobo
5ea1e6f05c Merge remote-tracking branch 'origin/select-from-file-finder'
Conflicts:
	src/extensions/fuzzy-finder.coffee
	static/fuzzy-finder.css
2012-06-29 10:40:34 -06:00
Nathan Sobo
6c60993f5c Fuzzy buffer finder switches to the editor that has the selected buffer if it isn't open on the current active editor 2012-06-29 09:59:37 -06:00
Nathan Sobo
22515e7ba0 RootView.open takes an 'allowActiveEditorChange' option
When the 'allowActiveEditorChange' option is true, RootView will try to activate an existing edit session for the given path on *any* editor, and switch focus there. This will be used by the fuzzy-finder for the meta-b option, which should open the chosen buffer on the editor that contains it, even if it isn't currently active.
2012-06-29 09:48:16 -06:00
Nathan Sobo
db212fc077 Spec 💄 preparing for specialized selection logic when fuzzy-finding open buffers 2012-06-28 13:39:04 -06:00
Nathan Sobo
f4832148cd Buffer finder does not open if there are no open buffers with paths 2012-06-28 13:17:49 -06:00
Nathan Sobo
423b312e9c Meta-b opens the fuzzy finder with paths to the current editor's buffers 2012-06-28 12:57:52 -06:00
Nathan Sobo
ed48622a3a Rename FileFinder to FuzzyFinder, which will make more sense when we can also use it to fuzzy-find on open buffers 2012-06-28 11:35:30 -06:00
Nathan Sobo
3cce8f9afd Ensure single-line snippets do not indent the following line 2012-06-27 08:03:54 -06:00
Nathan Sobo
2cb993760b Make fs.exists return false for null/undefined paths 2012-06-27 07:56:02 -06:00
Nathan Sobo
5b11762989 Fix bug where edit sessions were not properly restored on refresh 2012-06-27 07:53:32 -06:00
Nathan Sobo
086b33f606 Merge branch 'snippets'
Conflicts:
	src/app/root-view.coffee
2012-06-26 22:58:32 -06:00
Nathan Sobo
6db42114f9 If the user attempts to switch tab stops while the cursor is not *on* a tab stop, the snippet is terminated 2012-06-26 22:43:23 -06:00
Nathan Sobo
01993f1be2 Editor selects text that was typed at a tab-stop when shift-tabbing back to it 2012-06-26 17:55:40 -06:00
Corey Johnson
1059a6a495 Make dev tools work with specs 2012-06-26 16:41:13 -07:00
Corey Johnson
3efcc50a0d Renamed call to ControlPanel.hide to ControlPanel.detach 2012-06-26 16:41:13 -07:00
Corey Johnson
6d69ec77f1 Remove un-needed window.advanceClock calls from editor 2012-06-26 16:41:13 -07:00
Nathan Sobo
65991c686a Snippets can contain placeholder text (but can't nest yet)
Snippet placeholders are managed by adding an "anchor range" to the edit session. An anchor range basically tracks two anchors for the start and the end of the range.
2012-06-26 17:29:32 -06:00
Nathan Sobo
c354f016b9 Ensure tab-stops are correctly placed on indented snippet lines 2012-06-22 23:03:29 -06:00
Nathan Sobo
3483317549 Subsequent lines of a snippet are indented based on the first line 2012-06-22 22:57:49 -06:00
Nathan Sobo
de9486320d Shift-tab moves through snippet tab stops backwards 2012-06-22 22:10:14 -06:00
Nathan Sobo
6389b19b7c Merge branch 'master' into snippets 2012-06-22 16:25:33 -06:00