Commit Graph

607 Commits

Author SHA1 Message Date
Nathan Sobo
c5004b71b1 Selections are only cleared when cursor is explicitly moved
This allows multiple selections to be modified without changes to an earlier selection clearing later selections. It means we can remove the `modifySelections` method from `CompositeSelection` and just call methods on selections in a loop.
2012-04-03 11:27:49 -06:00
Corey Johnson
b4cfd7fc85 Selection and Cursor use Anchor to hold their buffer and screen positions 2012-04-03 08:58:25 -07:00
Corey Johnson
edbd378879 All keybindings are stored in the src/keybindings folder now 2012-04-02 08:57:08 -07:00
Corey Johnson
23fae4c919 Rename mentions of url to path 2012-03-30 15:52:19 -07:00
Corey Johnson
230f40bf3e Window title is set to active editor's buffer path. 2012-03-30 15:15:20 -07:00
Corey Johnson
abb585fbf6 Editor emits buffer-changed-event 2012-03-30 15:14:59 -07:00
Corey Johnson
001d866bec Event names are present tense, so buffer emits 'path-change' 2012-03-30 11:26:34 -07:00
Corey Johnson
90242a787f Use Buffer.getPath and Buffer.setPath(path) 2012-03-30 11:20:17 -07:00
Corey Johnson
551f09dce6 Buffer emits a 'path-changed' event when its path changes 2012-03-30 11:13:58 -07:00
Corey Johnson
5b7a02534c Made test run against empty project 2012-03-30 10:22:54 -07:00
Corey Johnson
dc7edc22cf Loading root view with no url opens an empty buffer 2012-03-30 09:42:02 -07:00
Nathan Sobo
b9cec3cd94 Editor handles delete-to-end-of-word, plus alt-d and alt-delete bindings for it 2012-03-29 15:32:37 -07:00
Nathan Sobo
fc76bed81e x/$/ places cursors at end of lines in current selection
Editor addSelectionForBufferRange no longer attempts to recycle an existing empty selection, because this was interfering with x selecting zero-width matches. It always adds a new selection, and tools must take care to use it correctly.
2012-03-29 11:46:56 -07:00
Nathan Sobo
722b685b2e Editor handles backspace-to-beginning-of-word 2012-03-29 11:33:15 -07:00
Nathan Sobo
e56ced8f3b Merge branch 'master' of github.com:github/atom 2012-03-29 11:12:23 -07:00
Corey Johnson
d739ebddbc Add tests to traverseRegexMatchesInRange 2012-03-29 11:01:26 -07:00
Corey Johnson & Nathan Sobo
90ebbe80e6 Add select-to-end-of-word and select-to-beginning-of-word 2012-03-29 09:53:18 -07:00
Nathan Sobo
b053f42880 Merge branch 'master' of github.com:github/atom 2012-03-28 18:08:14 -07:00
Nathan Sobo
a27b54b21b Up/down in command panel navigates command history. 2012-03-28 18:08:00 -07:00
Corey Johnson & Nathan Sobo
88c4705f8a Add move-to-end-of-word and move-to-beginning-of-word.
Buffer.traverseRegexMatchesInRange matches text that at end of range, even if the match could have exceeded end of the range.
2012-03-28 17:39:03 -07:00
Nathan Sobo
a4c25dc678 Flash red when entering a malformed command in the command panel 2012-03-28 16:11:44 -07:00
Nathan Sobo
e0ed462c6e Merge branch 'master' of github.com:github/atom 2012-03-28 15:42:29 -07:00
Nathan Sobo
7ea3b2d75d Regex searches wrap around to the beginning of the buffer 2012-03-28 15:42:09 -07:00
Corey Johnson & Nathan Sobo
2d85825126 Add select-to-beginning-of-line and select-to-end-of-line 2012-03-28 15:12:46 -07:00
Nathan Sobo
a90380bc63 Editor handles move-to-first-character-of-line
Moves to the first character of the line, unless its already on the first character, in which case it moves to the first column of the line.
2012-03-28 15:09:10 -07:00
Nathan Sobo
664e8c1701 Editor handles move-to-previous-word events 2012-03-28 14:36:40 -07:00
Nathan Sobo
bd0e4fa467 💄 2012-03-28 14:22:53 -07:00
Nathan Sobo
8ca55d7dfd Merge branch 'master' of github.com:github/atom 2012-03-28 14:20:54 -07:00
Nathan Sobo
e7a9ee5bee Add Buffer.backwardsTraverseRegexMatchesInRange 2012-03-28 14:20:41 -07:00
Corey Johnson & Nathan Sobo
2352b49bb6 Add move-to-beginning-of-line and move-to-end-of-line events to editor 2012-03-28 14:15:51 -07:00
Corey Johnson & Nathan Sobo
c6d7aaf39c Add basic top/bottom cursor/selection commands 2012-03-28 13:59:43 -07:00
Nathan Sobo
cce1218fda Editor supports move-to-next-word events 2012-03-28 13:50:52 -07:00
Nathan Sobo
378e867377 Add a disabled failing test for substitution with multiple selections 2012-03-28 10:18:55 -07:00
Nathan Sobo
5146abb7e1 Eliminate Editor.getCursor 2012-03-28 10:17:46 -07:00
Nathan Sobo
8727caf97a Regex addresses always search from the last selection in the buffer 2012-03-27 18:30:49 -07:00
Nathan Sobo
847e3d16e5 Add Buffer.traverseRegexMatchesInRange 2012-03-27 17:41:53 -07:00
Nathan Sobo
7707ac5943 Substitution matches ^ to the beginning of lines 2012-03-27 17:02:17 -07:00
Corey Johnson & Nathan Sobo
5e89c44477 Match $ in command regexes as end of line. Don't infinitely loop on substituting zero-width matches 2012-03-27 15:39:07 -07:00
Corey Johnson & Nathan Sobo
7d969e145a x command loops over all selected regions 2012-03-27 14:32:20 -07:00
Nathan Sobo
ad3aa0709c Add x command, which selects all matches in the current selection 2012-03-27 12:54:28 -07:00
Nathan Sobo
461fdd5e61 Selection merging with mouse maintains directionality of last selection 2012-03-27 11:52:55 -07:00
Corey Johnson & Nathan Sobo
e62e062f9b Maintain selection directionality when merging selections with keyboard 2012-03-27 11:26:36 -07:00
Corey Johnson & Nathan Sobo
81869ebf59 After shift/arrow-key movement, merge overlapping selections 2012-03-27 11:09:35 -07:00
Corey Johnson & Nathan Sobo
4be12ec461 Clear selection and update its appearance on delete
This fixes issues with selections in which the cursor precedes the anchor not getting cleared because the cursor doesn't move when text is deleted.
2012-03-27 10:21:26 -07:00
Corey Johnson
8866789b9c add shift+arrows movement for multi-selections 2012-03-27 09:43:30 -07:00
Corey Johnson
819f1a86f2 Delete works for multiple selections 2012-03-27 09:12:58 -07:00
Corey Johnson & Nathan Sobo
553194dc9e Backspace works with multiple selections 2012-03-27 09:10:11 -07:00
Nathan Sobo
29a2cc5886 Delete works with multiple cursors. 2012-03-26 19:39:09 -07:00
Nathan Sobo
e6e24158ae Can replace multiple selections on same line with newlines.
Also storing both buffer position and screen position of anchor in selection at the same time, so we can always reference either one. Whenever one is updated, we automatically update the other.
2012-03-26 18:16:55 -07:00
Corey Johnson & Nathan Sobo
37df49f77e Selection anchors move on buffer changes 2012-03-26 17:03:17 -07:00