Commit Graph

24 Commits

Author SHA1 Message Date
Nathan Sobo
d3cb001d65 Use RowMap instead of LineMap in DisplayBuffer 2013-05-10 13:20:42 -06:00
Nathan Sobo
3e937e9811 Merge remote-tracking branch 'origin/master' into know-when-to-foldem
Conflicts:
	src/app/buffer-marker.coffee
	src/app/cursor.coffee
	src/app/display-buffer-marker.coffee
	src/app/display-buffer.coffee
	src/app/edit-session.coffee
	src/app/fold.coffee
	src/app/line-map.coffee
	src/app/range.coffee
	src/app/selection.coffee
	src/app/text-buffer.coffee
2013-05-03 18:29:52 -06:00
Garen Torikian
a8a28fea18 Update DisplayBufferMarker 2013-05-01 17:01:53 -07:00
Garen Torikian
2357f46761 Fix block comments in src 2013-05-01 16:58:43 -07:00
Nathan Sobo
56a9316a28 Fix docs references 2013-04-30 11:37:31 -06:00
Nathan Sobo
1f9e33d995 WIP: Base folds on markers.
Still a couple of specs failing on this for changes that straddle the
start / end of a fold. We need a new marker invalidation strategy for
these cases.
2013-04-30 04:30:08 -06:00
Nathan Sobo
32178541fe Emit 'destroyed' events from display buffer markers 2013-04-29 21:01:48 -06:00
Nathan Sobo
51e915c423 Replace marker 'observe' methods w/ ordinary 'changed' event 2013-04-29 21:01:48 -06:00
Nathan Sobo
4ca00f7347 Simplify marker events
Instead of marker-added and marker-removed events which are emitted
when markers are created/invalidated/revalidated/destroyed, we now
just have marker-created events that are triggered *only* when markers
are created for the first time. The marker itself emits a 'destroyed'
event when it is destroyed. The marker already notifies observers when
its validation status changes, so that's covered.
2013-04-29 21:01:48 -06:00
Nathan Sobo
78bb074c0d Add DisplayBufferMarker.inspect 2013-04-29 21:01:48 -06:00
Nathan Sobo
6f34d0b346 Document new methods 2013-04-29 21:01:48 -06:00
Nathan Sobo
3a11c56438 Add .isDestroyed method to markers 2013-04-29 21:01:47 -06:00
Nathan Sobo
a028dff6e9 Add DisplayBufferMarker.isValid 2013-04-29 21:01:47 -06:00
Nathan Sobo
f4be899ae9 Switch EditSession over to object-oriented markers API 2013-04-29 21:01:47 -06:00
Nathan Sobo
5403bc647a Convert display buffer markers to object-oriented API 2013-04-29 21:01:47 -06: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
0c5e38680d Internalize a bunch of methods 2013-04-12 14:37:21 -05:00
Kevin Sawicki & Nathan Sobo
d6d6ff8cca 💄 2013-02-26 15:08:33 -08:00
Kevin Sawicki & Nathan Sobo
42fe87a9a2 Notify observers when display buffer markers are invalidated 2013-02-26 14:59:09 -08:00
Nathan Sobo
3625a55f68 Update markers before triggering 'changed' events
This prevents the editor from synchronously redrawing in specs with
cursors in invalid locations. Markers are always updated under the
hood before a change event is emitted from the Buffer or DisplayBuffer.
We still wait to trigger marker observers, but if their position gets
read, it is up to date.
2013-02-12 17:09:05 -07:00
Nathan Sobo
56c81ccf0f Memoize head and tail screen positions in DisplayBufferMarker 2013-02-06 17:32:13 -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
df4ea9293d Build DisplayBufferMarker object to help track marker screen positions
There are 3 failures, which I think are attributable to the fact that
I'm not emitting events from the when the selection tail changes, and
I'm not emitting redundant events when the head is changed to the
same position it was previously, whereas before I wasn't guarding
against redundant events.
2013-02-02 21:11:42 -07:00