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
9eae88e97b
Anchors and AnchorRanges are added to the buffer.
...
Also: Destroying an AnchorRange removes it from the EditSession / Buffer.
2012-07-13 17:18:10 -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
23b42faa1d
Added EditSession.copy()
...
Also, EditSession only needs a project to be deserialized
2012-07-13 09:35:19 -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
Corey Johnson & Nathan Sobo
c39172d625
Change fold colors for twilight theme
2012-07-13 09:04:22 -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
f02e724606
💩
2012-07-12 18:00:18 -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
bee6bf0ff5
Add explicit ZeroAddress object to command language AST
2012-07-12 17:56:23 -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
64a9c245e7
Quote regex passed to grep
2012-07-12 12:11:00 -07:00
Corey Johnson & Nathan Sobo
075b2e4304
Don't rethrow execeptions in exec callbacks.
...
Since the callbacks are executed asynchronously, no v8 code is above them on the stack to which to rethrow. It was causing crashes.
2012-07-12 12:10:37 -07:00
Corey Johnson & Nathan Sobo
0d35d5613a
Non-zero exit codes reject promise with a detailed message
2012-07-12 12:07:32 -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
2fe56ba077
Remove logging
2012-07-12 11:11:45 -06:00
Corey Johnson & Nathan Sobo
b62ddcfa01
Assign autocompleter to editor so we can inspect it when it f's up
2012-07-12 11:11:34 -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
db6692b2f6
Fix the $native.exec callback in ChildProcess.exec
...
It's stderr, not stdin. Also we have to look at exitStatus, not error to see if the process failed. None of this is tested, which is bad.
2012-07-11 18:48:49 -06:00
Nathan Sobo
92f4519db2
Allow null characters in child process output
...
This is needed because grep uses a null character as a delimiter after the file path.
2012-07-11 18:45:57 -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
84e6c04af2
Add atom-debug-test scheme which automatically runs tests when atom starts
2012-07-10 15:04:02 -07:00
Nathan Sobo
61cfbe530b
Fix indentation of selected region with tab
2012-07-06 15:18:32 -06:00
Nathan Sobo
0c2f5b4d7d
Merge branch 'master' of github.com:github/atom
2012-07-06 13:43:33 -06:00
Nathan Sobo
60eb4a8a55
Update README
2012-07-06 13:41:34 -06:00
Corey Johnson & Nathan Sobo
fca74ee925
Revert "WIP: making folded lines look better"
...
This reverts commit 0e4f156cb0 .
2012-07-06 12:36:50 -07:00
Corey Johnson
5281a47023
Merge pull request #30 from github/improve-undo-manager
...
Improve undo manager
2012-07-06 12:23:55 -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
0e4f156cb0
WIP: making folded lines look better
2012-07-06 11:19:19 -07:00
Corey Johnson & Nathan Sobo
5554d15bdb
Add sample .atom directory to project root
2012-07-06 12:14:57 -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
Corey Johnson & Nathan Sobo
523f240fe3
Properly dereference smart-pointer in native reload logic
2012-07-06 11:40:36 -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