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
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
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
c05fa7dc6f
Merge branch 'master' into global-find
...
Conflicts:
src/app/buffer.coffee
2012-07-20 19:01:38 -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
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
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
b959d5aa37
Buffers are memoized on project by path
2012-07-18 12:56:09 -07:00
Corey Johnson & Nathan Sobo
d36873f702
Rename Project.open to Project.buildEditSessionForPath
2012-07-18 11:20:13 -07: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
c3fe9aa0b3
Implement refcounting scheme on Buffer
2012-07-17 14:24:33 -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
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
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
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
d2d6efdcb5
Project.scan invokes the callback with matches
2012-07-12 11:12:31 -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
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
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
b254fa39d9
💄 Replace editor.getBuffer().getText() w/ editor.getText()
2012-07-04 12:41:51 -06:00