Kevin Sawicki
881efd9c5d
Restore selection when undoing an insert newline below
2013-02-20 14:09:40 -08:00
Kevin Sawicki
af58c1e83f
Bind meta-shift-enter to insert newline above current line
...
Closes #292
2013-02-20 13:44:30 -08:00
Nathan Sobo
4fdb1c454e
Restore marker cleanup assertions
...
Now that EditSessions clean up their markers, we can pass these tests
again.
2013-02-06 17:29:08 -07:00
Kevin Sawicki & Nathan Sobo
59d0742c17
Remove Anchor and AnchorRange. They're fully replaced by markers.
...
We're still leaking markers for selections and cursors. We need to
clean that up before merging.
2013-02-05 18:15:48 -07:00
Kevin Sawicki & Nathan Sobo
13183639b6
Ensure the cursor becomes visible when the selection is emptied
...
(Even if the cursor doesn't move)
2013-02-05 17:06:56 -07:00
Kevin Sawicki & Nathan Sobo
94d1edcc06
Add EditSession.selectMarker
2013-02-05 15:54:20 -07:00
Kevin Sawicki & Nathan Sobo
240e893d33
Don't emit a cursor-moved event when only the tail of the marker moves
2013-02-05 15:19:10 -07:00
Nathan Sobo
1d30605f7f
Convert selection and cursor fully over to markers.
2013-02-05 13:39:00 -07:00
Nathan Sobo
aa076a0bf2
Remove focused specs
2013-02-02 16:45:15 -07:00
Nathan Sobo
1bbb954239
EditSession specs passing after converting Selection to use markers
...
Still a bit of a mess though...
2013-01-31 18:26:29 -07:00
Nathan Sobo
628701fd3a
Finish converting cursors to use markers.
...
The model layer works at least… haven't tested the view. Will test out
the view once I get the selection model working.
2013-01-31 15:52:28 -07:00
Nathan Sobo
063cb71175
Spelling 💄 in spec
2013-01-30 13:24:15 -07:00
Nathan Sobo
113a8fa279
Merge remote-tracking branch 'origin/dev' into better-anchors
...
Conflicts:
src/app/cursor.coffee
src/app/editor.coffee
2013-01-30 12:59:04 -07:00
Nathan Sobo
30909a8e8f
Move anchor points to buffer; restore invalidated points on undo
2013-01-30 12:23:42 -07:00
Corey Johnson
97fa9d522a
end/beginning word implementations are now more similar
2013-01-30 08:39:32 -08:00
Nathan Sobo
6c7b93872c
Add failing specs for undoing changes that surround anchor points
2013-01-29 18:29:42 -07:00
Nathan Sobo
0ecfba3262
WIP: Start adding new anchorPoint API on edit session
...
These will replace anchors, but they won't be stored on the Buffer
at all. The API user will access them by a returned scalar id rather
than calling methods on the returned anchor object directly.
2013-01-29 18:21:56 -07:00
Corey Johnson
46aefc75ab
Make EditSession specs match vim style word behavior
2013-01-29 16:57:23 -08:00
Corey Johnson
dac92ca6e7
Make cursor.moveCursorToBeginningOfWord behave like vim
2013-01-29 16:57:22 -08:00
Corey Johnson
b66efbe3e7
cursor.getBeginningOfCurrentWordBufferPosition behaves like vim
2013-01-29 16:57:22 -08:00
Kevin Sawicki
7c7ca4a6c3
Don't auto outdent if already fully outdented
2013-01-22 17:39:03 -08:00
Kevin Sawicki
59f7b6650c
Don't auto outdent if preceding row is null
2013-01-22 17:38:23 -08:00
Andy Delcambre
759fe2dd5b
Bind meta-= to autoindent currently selected rows
...
Closes #142
2013-01-18 11:33:20 -08:00
Nathan Sobo
b0fe034c9a
Add autoflow package w/ autoflow:reflow-paragraph command
2013-01-10 17:29:41 -07:00
Kevin Sawicki & Nathan Sobo
4dc7ade4e6
Globally mock pasteboard read and write in specs
2013-01-10 11:41:07 -08:00
Corey Johnson
ca41bf0709
Set auto-indent config defaults
2013-01-10 10:38:44 -08:00
Corey Johnson
d53572d54d
Rename editor.autoIndentPastedText to editor.autoIndentOnPaste
2013-01-10 09:42:20 -08:00
Corey Johnson
d2521ca8b8
Set editor.autoIndent to false for tests
...
Auto-indenting makes it more difficult to write simple tests. So we turn it off.
2013-01-10 09:41:49 -08:00
Corey Johnson
4f0e2c1e9b
Add editor.autoIndentPastedText config option
2013-01-10 09:31:57 -08:00
Corey Johnson
d55dfc8a6f
AutoIndent is a config property instead of a syntax property
2013-01-10 09:31:23 -08:00
Corey Johnson
21fa3e5a0f
autoIndent is stored as a syntax property
2013-01-09 16:26:57 -08:00
Corey Johnson
f5ee676e5e
Pass autoIndent as an option flag
...
Instead of querying EditSession for autoIndenting
2013-01-09 15:24:04 -08:00
Corey Johnson
95dcf275e4
Remove *.getLastCursor()
2013-01-08 18:27:29 -08:00
Corey Johnson
f9e9b4203c
*.getCursor() always returns last cursor (does not use index)
...
We weren't using the index functionality anywhere.
2013-01-08 18:27:29 -08:00
Kevin Sawicki
b4654ea435
Use buffer position when end of word isn't found
...
Previously if null was returned for the end of word position then
it was interpreted as 0,0 which would select the entire contents
before the current word instead of the current word.
2013-01-07 11:30:30 -08:00
Kevin Sawicki
bbdff31faf
Lowercase current word/selection with meta-U
2013-01-07 09:37:51 -08:00
Kevin Sawicki
2a0ee62685
Uppercase current word/selection with meta-u
2013-01-07 09:37:51 -08:00
Nathan Sobo
0a08d03c68
Rename Buffer, TokenizedBuffer, and Selection events
2013-01-04 13:59:11 -07:00
Kevin Sawicki & Nathan Sobo
ec13c38c7d
Add EditSession.transact and friends
...
`EditSession.transact` adds more semantics on top of `UndoManager`'s
version pertaining to restoring selections on undo/redo of the
transaction.
2013-01-04 12:42:09 -07:00
Nathan Sobo
6d9402b5c9
Rename Anchor and Buffer events to passive-voice scheme
2013-01-02 13:48:10 -07:00
Nathan Sobo
08a27cf93d
Load grammars from TextMatePackage. Delete TextMateBundle.
...
TextMatePackage is only designed to load resources out of a TextMate
bundle. It's used only at load time, and from that point out we only
refer to our own global `syntax` data structure to access the data that
it loads.
2012-12-31 18:28:38 -06:00
Jon Rohan
92a9831201
writing spec for .backspaceToBeginningOfLine()
2012-12-28 17:24:57 -08:00
Nathan Sobo
acc0503684
Merge remote-tracking branch 'origin/master' into config
...
Conflicts:
src/app/keymap.coffee
src/extensions/outline-view/src/keymap.coffee
src/extensions/outline-view/src/tag-reader.coffee
src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee
src/packages/fuzzy-finder/src/fuzzy-finder.coffee
2012-12-18 20:32:05 -07:00
Corey Johnson & Nathan Sobo
1dde562c6b
Don't explode when pasting on fractionally-indented lines w/ hard tabs
2012-12-06 12:01:59 -07:00
Corey Johnson & Nathan Sobo
de5bd91055
Paste indent normalization works with on lines w/ mixed indentation
...
Normalizing the indent no longer explodes when pasting on a line that has mixed tabs and spaces when the edit session is using hard tabs.
2012-12-06 11:59:23 -07:00
Nathan Sobo
bf9a7cc9a1
Fix exception when moving to the end of word when there *is* no word
2012-11-26 15:12:32 -07:00
Corey Johnson & Nathan Sobo
bfb1742285
ctrl-a on an empty line stays on that same line.
...
Fixes #95
2012-11-19 10:02:31 -08:00
Corey Johnson & Nathan Sobo
8184c0248b
Don't store tabLength on EditSession
2012-11-06 11:56:18 -08:00
Corey Johnson
b85a95eaa1
Make leading spaces atomic (length based on tabLength)
2012-11-06 09:03:54 -08:00
Nathan Sobo
b87d7cd0df
Auto-indent skips cursor over leading whitespace before inserting more
...
This preserves the user's intent to bring the line's total amount of leading whitespace to the desired indent level.
2012-11-05 15:15:00 -07:00