Commit Graph

117 Commits

Author SHA1 Message Date
Garen Torikian
5a944514f3 Rewrite all hash key options 2013-05-01 17:01:55 -07:00
Garen Torikian
26564ee020 Update cursor 2013-05-01 17:01:53 -07:00
Garen Torikian
2357f46761 Fix block comments in src 2013-05-01 16:58:43 -07:00
Garen Torikian
bb40ad6177 💄 all the things 2013-04-26 13:49:12 -07:00
Garen Torikian
5ee388cede Get it to a proper 80% 2013-04-18 18:50:22 -07:00
Garen Torikian
a50cfa26cc Updates for new biscotto 2013-04-18 13:05:40 -07:00
Garen Torikian
8bd02358d2 Should I regret a lack of better commit messages? 2013-04-12 22:35:54 -05:00
Garen Torikian
f3b7874007 Get a good chunk of Selection} 2013-04-12 15:54:56 -05:00
Garen Torikian
286e70cc57 Hella Editor updates 2013-04-12 15:17:11 -05:00
Garen Torikian
7e5b6bf5c4 Massive updates 2013-04-11 21:11:12 -05:00
Garen Torikian
bb8f5bb40c Fix errors 2013-04-11 02:29:48 -05:00
Garen Torikian
79562f51fd Some more low hanging fruit 2013-04-10 01:28:50 -05:00
Garen Torikian
bf76083939 Merge master 2013-04-09 14:54:17 -05:00
Kevin Sawicki
fe1b4c71a3 Use ? instead of or 2013-04-09 10:47:19 -07:00
Garen Torikian
a16428c5b6 Merge master 2013-04-09 01:37:46 -05:00
Mutwin Kraus
2445829f83 Specs for moveCursorToBeginningOfNextWord 2013-04-08 14:15:25 +02:00
Nathan Sobo
ff8491f8d3 Base cursor visibility on marker emptiness instead of tail status 2013-04-05 14:17:20 -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
f6bfab5dd7 Don't freak when selections are added & removed before display update
Previously, if a selection was added and removed before the editor got
a chance to update its display, it would try to add a selection view
for the destroyed selection. Now we check the new selections and
cursors to make sure they aren't destroyed before we add views for
them.
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
Garen Torikian
9e38537239 Hella docs, we're up to 10% coverage 2013-04-04 18:54:36 -07:00
Nathan Sobo
5df78812ef Rename EditSession.scanInRange to scanInBufferRange
This is more consistent with other range-oriented methods on
EditSession. At this layer, we need to be explicit about what kind
of range we are talking about.
2013-04-03 11:28:55 -06:00
Nathan Sobo
59a5a5bc8f Always pass a hash to TextBuffer.scanInRange iterators
This makes it easy to only assign variables for the information you
need in the iterator. Before, we always forced you to take a match and
a range as the first two arguments even if you weren't using them.
2013-04-03 11:16:49 -06: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
0d6d89b209 Fix cursor autoscrolling when position doesn't change
When assigning the cursor's position, if we decide we want to autoscroll,
we should do so even if the cursor's position doesn't change.

The previous approach relied on a comparison of the position being
assigned, but this is before it has been clipped. Now we rely on a
boolean return value from the marker position assignment methods, which
tells us if the position has changed. If not, we need to emit our own
event to force autoscrolling.
2013-02-05 16:37:54 -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
afe0a6570a Reduce observation to single observeMarker method on display buffer
It will call the observer callbacks with the buffer and screen positions
of the head and tell each time any of these values is changed.
2013-02-04 21:24:06 -07:00
Nathan Sobo
ead93d0f39 Rename to DisplayBuffer.observeMarkerHeadPosition
When you observe, you get callbacks whenever the screen or buffer
position changes, and you get the new and old position in both 
coordinate types.
2013-02-04 11:32:47 -07:00
Nathan Sobo
bd96db781e Pass old/new buffer and screen positions to marker position observers
This is needed by the snippets package, which needs to know where the
cursor was previously when it moves to decide whether to cancel the
current snippet.
2013-02-02 18:00:35 -07:00
Nathan Sobo
e53403718a Tell marker head observers if a move was caused by a buffer change
This is used by cursor to only autoscroll when the marker head is
explicitly moved, so that passive movements caused by buffer insertions
don't trigger autoscrolling.
2013-02-02 16:17:14 -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
2df0b9fa19 WIP: Start converting cursor and selection to be based on markers 2013-01-30 22:47:29 -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
Corey Johnson
97fa9d522a end/beginning word implementations are now more similar 2013-01-30 08:39:32 -08:00
Corey Johnson
f698d7e9dc 💄 2013-01-30 08:20:11 -08:00
Corey Johnson
086c7ef987 multiline regex not needed 2013-01-30 08:15:28 -08:00
Corey Johnson
1a8986aae2 Fix start/end for range 2013-01-30 08:02:19 -08:00
Corey Johnson
c71f58a652 💄 2013-01-29 17:08:07 -08:00
Corey Johnson
167b9c28fa Rename wordSeparators to nonWordCharacters 2013-01-29 17:06:39 -08:00
Corey Johnson
8973a66cfe selection.selectWord will consider whitespace a word 2013-01-29 16:57:22 -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
Corey Johnson & Kevin Sawicki
1d2fa089e5 editor.wordRegex is now a config option. 2013-01-29 16:57:22 -08:00
Nathan Sobo
2380fa3445 Handle 'autoscroll' entirely in Cursor instead of in Anchor
This commit makes autoscroll a 3-valued property on the cursor. If it
is set to true or false, that setting will stick until the cursor's
next visual update. That means we can explicitly move the cursor with
autoscroll set to false, but also still autoscroll by default when the
cursor's anchor moves on its own.
2013-01-29 12:11:43 -07:00
Corey Johnson
0a5e0a85f8 Using getCurrentWordBufferRange instead of getCurrentWord 2013-01-21 15:00:17 -08:00
Corey Johnson
7df999dc32 Remove options.includeDelimiter
It was not being used anywhere
2013-01-21 13:27:59 -08:00
Derek Greentree
b229dd21f4 fuzzy find files using content under cursor 2013-01-17 15:36:22 -08:00
Nathan Sobo
b0fe034c9a Add autoflow package w/ autoflow:reflow-paragraph command 2013-01-10 17:29:41 -07:00
Corey Johnson
95dcf275e4 Remove *.getLastCursor() 2013-01-08 18:27:29 -08:00