Kevin Sawicki
c30220ae80
Uncomment lines that match non-whitespace prefix of comment regex
2012-10-04 15:37:28 -07:00
Corey Johnson
f95e67d8cd
Triple click selects entire line (including \n). Fixes #44
2012-09-26 13:53:51 -07:00
Nathan Sobo
1383a94d60
Second attempt: don't blow up when commenting in files w/ no language bundle
2012-09-25 17:14:25 -06:00
Nathan Sobo
b4b34b0489
Don't explode on meta-/
if there isn't a valid comment regex
2012-09-25 13:27:46 -06:00
Nathan Sobo
b00d0bacd9
When uncommenting multiple lines, don't raise an error if a line isn't commented
...
Previously, we were assuming that when uncommenting, that every line would match the comment regex. But this might not be the case. If the first line in the selection is commented but some subsequent lines aren't, they won't match the comment regex. So this commit guards for that case.
2012-09-25 13:19:59 -06:00
Kevin Sawicki
7278bc62c6
Ensure start row is always >= 0
...
Previously if a file was a single line
it couldn't be deleted using the delete
line command because the start row would
index one row back which would be -1 and
therefore not be able to report a length
for use in the delete range.
2012-09-20 09:00:37 -07:00
Kevin Sawicki
f241bc5d2b
Delete entire region when deleting a folded line
2012-09-19 18:16:45 -07:00
Kevin Sawicki
b18627ab9b
Add delete line support bound to meta-d key
2012-09-19 15:23:10 -07:00
Corey Johnson & Nathan Sobo
12b06ddf0c
Get spec suite running (lots of failures)
2012-08-27 17:36:36 -05:00
Nathan Sobo
c2c8724ad0
Initial commit
2012-08-10 13:32:19 -06:00
Corey Johnson
634bebd207
Toggling comments adjusts selection's start and end columns
2012-08-09 14:38:16 -07:00
Corey Johnson
cc5ee48470
Auto-outdent lines correctly
2012-08-09 13:10:37 -07:00
Corey Johnson & Nathan Sobo
e8aaec43f7
WIP: Reworking auto-indent/outdent logic
2012-08-09 12:57:47 -06:00
Corey Johnson
19511fe8b8
Selections are restored to their original ranges after toggling comments.
2012-08-09 10:46:54 -07:00
Corey Johnson & Nathan Sobo
1a243adfcf
All specs pass w/ TextMateGrammar for tokenization (auto-indent disabled)
2012-08-03 12:00:05 -06:00
Corey Johnson
08a55dfcac
wip: IndentationForRow almost works TextMate preferences
2012-08-02 17:02:17 -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
7ff31d1ad7
Remove toggleFold and replace with fold
2012-07-27 13:46:50 -07:00
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