Garen Torikian
5ee388cede
Get it to a proper 80%
2013-04-18 18:50:22 -07:00
Garen Torikian
130baf2235
Merge branch 'master' into api/docs
2013-04-17 16:08:18 -07:00
Corey Johnson
3c95fbd72c
Remove redundant conditional
2013-04-16 14:23:42 -07:00
Corey Johnson & Nathan Sobo
f21571eab1
Rename isFirstPoint to isHead in marker.updatePosition
2013-04-16 14:23:42 -07:00
Garen Torikian
f3b7874007
Get a good chunk of Selection}
2013-04-12 15:54:56 -05:00
Nathan Sobo
ff8491f8d3
Base cursor visibility on marker emptiness instead of tail status
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
Kevin Sawicki & Nathan Sobo
5b990cf571
Add the 'between' invalidation strategy for markers
...
This invalidates markers when the start or end point of the changed
range is between the head and tail position of the marker.
2013-02-26 17:42:47 -07:00
Kevin Sawicki & Nathan Sobo
e858f7eb2a
Replace stayValid option w/ validationStrategy when creating markers
2013-02-26 17:03:02 -07:00
Kevin Sawicki & Nathan Sobo
e36887900f
Notify observers when markers are invalidated/revalidated
2013-02-26 14:31:42 -08:00
Kevin Sawicki & Nathan Sobo
1fcaa52217
Remove unused parameter
2013-02-26 14:06:19 -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
Kevin Sawicki & Nathan Sobo
c893f0c338
Add Buffer.markersForPosition and coerce marker ids to strings
2013-02-05 15:50:54 -07:00
Nathan Sobo
1d30605f7f
Convert selection and cursor fully over to markers.
2013-02-05 13:39:00 -07:00
Nathan Sobo
58450d6a65
Give Buffer only a single observeMarker method
...
It will fire the callback whenever the marker's head or tail position
changes, and it's up to the subscriber to use the information how they
want to.
2013-02-04 20:35:30 -07:00
Nathan Sobo
44e48d42ea
Add Buffer.observeMarkerRange
2013-02-04 11:27:39 -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
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
ec521b3fd3
Add ability to cancel marker head position observations
2013-01-31 14:11:28 -07:00
Nathan Sobo
bc44540b10
Start adding ability to observe marker head positions
2013-01-31 14:00:01 -07:00
Nathan Sobo
1d1c613f5b
Allow buffer marker head and tail positions to be manipulated
2013-01-30 22:16:08 -07:00
Nathan Sobo
5dd142b966
Allow markers to be created in a reverse orientation
...
This means that the head of the marker precedes its tail in the buffer.
This will be important if we want to build selections on top of markers.
2013-01-30 21:44:57 -07:00
Nathan Sobo
d8ffdcd6bd
Allow markers to be created with just a position
...
When a marker is created with just a position, it only gets a head
position and has no tail position.
2013-01-30 21:37:57 -07:00
Nathan Sobo
dfe0cad217
Replace anchor point/range with a single concept: markers
...
A "marker" is basically like a persistent selection/cursor composite,
having a head and a tail. The "head" is like the cursor in a selection,
and the "tail" is like the part of the selection that doesn't move. My
goal is for markers to be the only construct used to track regions
in the buffer. I want to replace anchors with them.
2013-01-30 16:52:09 -07:00