Commit Graph

69 Commits

Author SHA1 Message Date
Nathan Sobo
7be3c55765 Only auto-indent when typing, not when pasting or programmatically inserting
This paves the way for using a different strategy to normalize indentation when pasting, without it getting tangled in auto-indent.
2012-10-23 11:59:54 -06:00
Corey Johnson
e2a917fcf3 Change tabText to tabLength 2012-10-18 11:31:39 -07:00
Kevin Sawicki
f2306f444a 💄 2012-10-01 15:44:58 -07:00
Kevin Sawicki
33abaff747 Don't highlight line if selection is multiline 2012-10-01 15:44:57 -07:00
Corey Johnson
f95e67d8cd Triple click selects entire line (including \n). Fixes #44 2012-09-26 13:53:51 -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
Nathan Sobo
c3e748a17c WIP: Use rake to start compiling resources (like require.coffee) 2012-08-26 16:29:46 -05:00
Nathan Sobo
c2c8724ad0 Initial commit 2012-08-10 13:32:19 -06:00
Corey Johnson
65d40557ff InsertText takes an option to turn autoIndent off 2012-08-09 16:20:45 -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
08a55dfcac wip: IndentationForRow almost works TextMate preferences 2012-08-02 17:02:17 -07:00
Nathan Sobo
54616aee78 Bugfix: When the command panel makes a selection, it destroys surrounding folds 2012-07-26 10:09:28 -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
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
3524490946 Ensure selection emits event if a buffer change moves its anchor 2012-06-29 11:55:16 -06:00
Nathan Sobo
e2efa95d13 Ensure that 'change-screen-range' events are triggered on selections by backspace 2012-06-22 16:20:50 -06:00
Nathan Sobo
8fa5723be9 When buffer or display-buffer change, update the position of all anchors on EditSession.
Cursors and selections no longer need to handle buffer/display-buffer changes directly. They register anchors with the EditSession, and subscribe to changes in their position instead. This opens up the anchor facility for use by extensions that want to track the screen position of a point in the buffer as the buffer and display buffer change.
2012-06-21 17:57:23 -06:00
Nathan Sobo
7f1b094ed2 Make Cursor and Selection create anchors via EditSession.prototype.addAnchor 2012-06-21 17:29:21 -06:00
Nathan Sobo
f99ce5782c 💄 2012-06-15 16:03:54 -06:00
Corey Johnson & Nathan Sobo
4a35427db3 Delete the newline at the end of a fold only when it makes sense 2012-06-15 14:53:15 -06: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
f025bec910 If a selection ends on a fold, backspace/delete delete all lines inside the fold 2012-06-14 15:52:54 -06:00
Nathan Sobo
e444ba193c Merge all ace adaptors into a single AceAdaptor class 2012-06-13 18:31:03 -06:00
Nathan Sobo
d04d4e22a2 Move autoOutdent code to LanguageMode 2012-06-13 18:08:08 -06:00
Nathan Sobo
fc72f39342 Move autoIndent code into LanguageMode 2012-06-13 16:12:51 -06:00
Nathan Sobo
09a05141d0 Remove old unused Anchor class 2012-06-13 11:06:41 -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
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
Nathan Sobo
2161336c78 Move logic out of CompositeSelection into EditSession 2012-06-08 17:46:14 -06:00
Nathan Sobo
873c80eaf2 Move most remaining logical methods from selection view into model 2012-06-08 15:26:54 -06:00
Nathan Sobo
31bd38dfcc Move merging of intersecting selections into EditSession and the Selection model 2012-06-08 13:26:54 -06:00
Nathan Sobo
7eb01272ed Move text insertion and auto indent/outdent code from the selection view to the model 2012-06-08 12:31:29 -06:00
Nathan Sobo
f3144fe0d8 Base the screen range of the selection view on the selection model 2012-06-08 11:22:12 -06:00
Nathan Sobo
5a37a39b9b Tie creation of SelectionViews to adding Selection models to the EditSession 2012-06-07 18:20:00 -06:00
Nathan Sobo
7cdd4d684f Rename Selection to SelectionView in preparation for adding a Selection model 2012-06-07 17:05:14 -06:00
Nathan Sobo
608c4f48bf Remove more logic from cursor view 2012-06-07 16:58:45 -06:00
Nathan Sobo
d872d12e04 Transfer word movement methods into cursor model 2012-06-07 15:33:01 -06:00
Nathan Sobo
21ae28657c Move moveTo(Beginning/FirstCharacter/End)OfLine methods to cursor model
Also, implement move to end of line by adding a clip option to setBufferPosition and passing [row, Infinity]
2012-06-07 11:28:40 -06:00
Nathan Sobo
fccc88acaf Move moveLeft/Right/ToTop/ToBottom methods into cursor model 2012-06-07 10:57:21 -06:00
Nathan Sobo
ddf29e89ec Slave CursorView's screen position to its cursor model. Move moveUp and moveDown methods into cursor model. 2012-06-07 10:47:30 -06:00
Nathan Sobo
e167afd794 Rename Cursor to CursorView in preparation for a Cursor model in EditSession 2012-06-06 18:01:08 -06:00
Corey Johnson
afab19938e Use wasReversed instead of isReversed to show the local variable stores some temporal state. 2012-06-05 11:30:29 -07:00
Corey Johnson
ce25b33c25 Inserting a newline before a top-level c-style statement (starting with a '{') no longer auto-indents it. 2012-06-05 09:09:20 -07:00
Nathan Sobo
b667ba4262 If selection is empty when toggling a line comment, keep it empty 2012-06-04 11:50:48 -06:00
Nathan Sobo
14e399fdf0 Meta-/ comments out selected lines 2012-06-01 19:38:33 -06:00
Nathan Sobo
3637c5b64b Remove stray console.log 2012-06-01 14:29:47 -06:00