Mutwin Kraus
c91de1e515
Merge remote-tracking branch 'origin/master' into vim-core-changes
...
Conflicts:
src/app/pane.coffee
2013-04-09 18:52:36 +02:00
Kevin Sawicki
2f67312a80
Don't prompt to save if buffer is opened elsewhere
...
This corrects a regression where closing an edit session that
is opened somewhere else should not prompt to save since it
won't be lost if closed immediately since it is still open in
another pane.
2013-04-08 16:30:35 -07:00
Mutwin Kraus
9041c56ef3
Spec for selectToBeginningOfNextWord
2013-04-08 14:19:28 +02:00
Mutwin Kraus
2445829f83
Specs for moveCursorToBeginningOfNextWord
2013-04-08 14:15:25 +02:00
Nathan Sobo
abc5ed5190
Add editor:add-selection-above command
2013-04-05 14:52:35 -06:00
Nathan Sobo
2efed9f42c
Add EditSession.consolidateSelections()
2013-04-05 14:52:30 -06:00
Nathan Sobo
bd58834e7d
Merge goal ranges when merging selections
2013-04-05 14:17:21 -06:00
Nathan Sobo
be009e87c2
Skip empty lines when adding selections below empty selections
...
Unless the selection's column is 0
2013-04-05 14:17:21 -06:00
Nathan Sobo
393cba4d42
Don't skip shorter lines when the adding empty selection below
2013-04-05 14:17:21 -06:00
Nathan Sobo
131df22c11
Skip lines that are too-short when adding non-empty selection below
2013-04-05 14:17:21 -06:00
Nathan Sobo
40d7fcf32c
🙊
2013-04-05 14:17:21 -06:00
Nathan Sobo
f22461e5e8
Clear goal range when selection is modified
...
Just like the cursor clears its goal column when it is moved in any
way other than vertically, the selection clears its goal range (the
range it will attempt to use when adding a selection below) when it
is changed in any way.
2013-04-05 14:17:20 -06:00
Nathan Sobo
31579703f0
Ensure new non-empty selections have an invisible cursor.
2013-04-05 14:17:20 -06:00
Nathan Sobo
af923cca9b
Preserve original selection's range when adding selection's below
...
Just like the cursor tries to stay in its "goal column" when moving
vertically, here we try to keep the same selection even when adding
across shorter lines.
2013-04-05 14:17:20 -06:00
Nathan Sobo
26e53584c1
Add 'editor:add-selection-below' command
...
It still needs work, but the basic idea is for every selection to
add another another selection over the same column range of the line
below.
2013-04-05 14:17:20 -06:00
Kevin Sawicki
e442dfff11
Support joining editor lines with ctrl-J
...
This can be used with or without a selection to join one
or more lines with the line below it separated by a space.
Refs #134
2013-04-04 11:07:59 -07:00
Kevin Sawicki
9773751e79
Delete left when meta-backspacing at start of line
...
Previously EditSession.backspaceToBeginningOfLine() would do nothing
if at the beginning of the line.
Now it selects left and does a delete so it can be used to delete
multiple lines continuously without having to move the cursor.
Refs #134
2013-04-04 09:25:35 -07:00
Corey Johnson & Nathan Sobo
1b56cfb270
LanguageMode switches to a better-matching grammar when it is added
2013-04-03 18:34:54 -06:00
Nathan Sobo
9efc326ff3
Remove spec that can be covered in text-buffer specs
2013-04-02 15:45:16 -06:00
Mutwin Kraus
cc87595e4e
Serialize TextBuffer inside EditSession serialize
2013-04-02 15:45:16 -06:00
Mutwin Kraus
693d8258ad
Preserve buffer contents for unsaved files when reloading
2013-04-02 15:45:16 -06:00
Kevin Sawicki
1d84274973
Return existing selections from addSelection()
...
Previously if a selection was added and then merged
away the selection-added event would still fire even
though the selection was already destroyed.
Now the existing selection that intersects with the
range is returned when the merge destroys the new selection.
Closes #374
2013-03-27 17:59:55 -04:00
Corey Johnson & Nathan Sobo
8437f3ff7f
Only load TextMate packages as needed in specs
...
Also: when a TextMate package is deactivated, remove its grammars
2013-03-26 17:35:42 -06:00
Corey Johnson & Nathan Sobo
dacb00ed67
Simplify grammar selection and its specs
2013-03-22 17:35:34 -06:00
Nathan Sobo
a2f72882d7
Rename grammarForFilePath to selectGrammar
...
The old name was misleading because it the decision is based on the
file contents in some circumstances.
2013-03-22 17:35:27 -06:00
Kevin Sawicki
f8ffe1c408
Only delete to end row when greater than start row
...
Closes #442
2013-03-21 17:07:36 -07:00
Kevin Sawicki & Nathan Sobo
1d1ba5f6d1
Use node's require instead of internal require
2013-03-12 10:38:05 -07:00
Corey Johnson & Nathan Sobo
98c9012bdb
💩
2013-03-07 14:31:04 -08:00
Corey Johnson & Nathan Sobo
17f4d6f064
EditSession reloads its grammar on the 'grammars-loaded' event
2013-03-07 14:25:14 -08:00
Nathan Sobo
54fc9efdcb
Eliminate fixturesProject global. Use project global instead.
2013-03-07 09:30:27 -08:00
Nathan Sobo
21990cf986
Add EditSession.getLongTitle
2013-03-07 09:30:24 -08:00
Nathan Sobo
de8198084c
EditSession emits 'title-changed' events when its buffer path changes
2013-03-07 09:30:24 -08:00
Nathan Sobo
beaeac4425
Rename buildEditSessionForPath to buildEditSession
...
Since this is the more external method, having a shorter name
is more convenient. The former `buildEditSession` method took a
Buffer, and is now called `buildEditSessionForBuffer`.
2013-03-07 09:28:51 -08:00
Corey Johnson & Kevin Sawicki
94099358f3
Inserting whitespace never auto-outdents
...
Closes #340
Shout out to @nathansobo
2013-03-05 10:19:24 -08:00
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