Corey Johnson & Nathan Sobo
d36873f702
Rename Project.open to Project.buildEditSessionForPath
2012-07-18 11:20:13 -07: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
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
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
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
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
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
Corey Johnson
801a91ec9b
Specs cleanup buffers
2012-06-29 15:38:12 -07:00
Corey Johnson
c3d7d3566f
Buffer listens for changes to file and triggers 'contents-change' event
2012-06-29 15:09:31 -07:00
Nathan Sobo
e2efa95d13
Ensure that 'change-screen-range' events are triggered on selections by backspace
2012-06-22 16:20:50 -06:00
Corey Johnson & Nathan Sobo
af9aec7cbc
SoftWrap state is stored in EditSessions, but it is set and toggled via Editor.
2012-06-20 09:28:23 -07:00
Corey Johnson & Nathan Sobo
d1c1f3cfce
Move autoIndent, tabText, softTabs and softWrap to project
2012-06-20 09:28:23 -07:00
Nathan Sobo
95622dc64e
If the cursor is at any buffer position inside a fold, backspace deletes the folded text
2012-06-15 14:41:05 -06:00
Corey Johnson & Nathan Sobo
e38ade2730
Bugfix: Backspace in middle of line below a fold no longer deletes the newline preceding the cursor
2012-06-14 17:08:14 -06:00
Corey Johnson & Nathan Sobo
1dfbaf67d1
Delete at the end of a line above a fold deletes the folded lines (leaving a newline)
2012-06-14 16:58:47 -06:00
Corey Johnson & Nathan Sobo
daa688b1e1
Merge branch 'master' of github.com:github/atom
...
Conflicts:
src/app/edit-session.coffee
2012-06-14 16:25:05 -06:00
Corey Johnson & Nathan Sobo
f025bec910
If a selection ends on a fold, backspace/delete delete all lines inside the fold
2012-06-14 15:52:54 -06:00
Corey Johnson
9c748d14c3
💄
2012-06-13 16:54:55 -07:00
Nathan Sobo
c09c672843
Rename screenLineForRow -> lineForScreenRow
2012-06-13 14:40:23 -06:00
Nathan Sobo
1a1d3b3cf9
EditSession no longer requires a reference to its Editor
2012-06-13 11:18:47 -06:00
Nathan Sobo
4ccf976501
Pass tabText into EditSession explicitly on construction
2012-06-13 11:13:41 -06:00
Nathan Sobo
a6b066ef3d
Move specs of fold interactions with backspace/delete/insertText methods to edit-session-spec
2012-06-13 10:32:23 -06:00
Corey Johnson & Nathan Sobo
222e12d29d
Backspace in column 0 below a fold absorbs line into fold
2012-06-12 16:49:49 -07:00
Corey Johnson & Nathan Sobo
6c8b2e1a54
Use buffer instead of line map for EditSession.clipBufferPosition(position)
2012-06-12 16:49:48 -07:00
Nathan Sobo
51905f245a
Move auto-indent/outdent specs from selection-spec to edit-session-spec
2012-06-12 16:31:17 -06:00
Nathan Sobo
0e592b0e7a
Move selectWord specs to edit-session-spec
2012-06-12 16:25:50 -06:00
Nathan Sobo
b44a0b69a9
Move specs for toggleLineCommentsInSelection to edit-session-spec
2012-06-12 16:22:18 -06:00
Nathan Sobo
560db26cf1
Move indent/outdent selection specs to edit-session-spec
2012-06-12 16:15:11 -06:00
Nathan Sobo
cca387b36a
Move selectLine specs from selection-spec to edit-session-spec
2012-06-12 16:14:37 -06:00
Nathan Sobo
3a93887292
Move structural folding to EditSession
2012-06-12 15:49:42 -06:00
Nathan Sobo
918b8d95da
Move some auto indent specs to edit-session-spec
2012-06-12 15:19:40 -06:00
Nathan Sobo
b895122c24
Simplify Editor spec's mouse event integration specs
...
Test handling of non-corresponding buffer & screen positions in spec on setCursorScreenPosition in edit-session-spec instead of in editor-spec
2012-06-12 14:44:45 -06:00
Nathan Sobo
8a34ea20c4
Move undo/redo specs to edit-session-spec
2012-06-12 13:44:40 -06:00
Nathan Sobo
4f50a4735d
Add specs for EditSession.proto.selectToScreenPosition. Move coverage of selection merging
2012-06-12 13:37:01 -06:00
Nathan Sobo
5e4625ebf7
Move cursor merging specs to edit-session-spec
2012-06-12 10:55:48 -06:00
Nathan Sobo
1245252ca4
Move deleteToEndOfWord specs
2012-06-12 10:38:09 -06:00
Nathan Sobo
727e9b8156
Move specs for selectUp/Down/Left/Right w/ multiple selections
2012-06-12 10:25:42 -06:00
Nathan Sobo
5f263e63f0
Move cutToEndOfLine specs to edit-session-spec
2012-06-12 10:18:18 -06:00
Nathan Sobo
89f180524a
Move coverage of multi-cursor text insertion, backspace, and delete to edit-session-spec
2012-06-12 10:12:12 -06:00
Nathan Sobo
b51ab212f6
Un-F
2012-06-11 17:40:51 -06:00
Nathan Sobo
e619d84893
Move insertTab specs to edit-session-spec
2012-06-11 17:40:02 -06:00
Nathan Sobo
915707cd9c
Move backspace, delete, and pasteboard operations specs to edit-session-spec
2012-06-11 17:35:13 -06:00
Nathan Sobo
c2c48b9b38
Move more specs to EditSession. Auto indent and soft tabs settings are delegated to edit session.
2012-06-11 17:06:40 -06:00