atom / bookmarks

Bookmark editor lines in Atom
MIT License
49 stars 36 forks source link

Fix bookmarked range duplication bug #72

Closed Ben3eeE closed 8 years ago

Ben3eeE commented 8 years ago

Description of the Change

Changes the DisplayMarkerLayer of a bookmark to use exclusive insertion strategy. This means that insertions at the start or end of the marked range should be interpreted as happening outside the DisplayMarkerLayer and not extend the range. The current behavior of extending the range when typing outside has many points of failure as discussed in https://github.com/atom/bookmarks/issues/62.

Gif of behavior after the change: bookmarks fix

Alternate Designs

N/A

Benefits

Possible Drawbacks

Someone depends on the current behavior.

Applicable Issues

Fixes https://github.com/atom/bookmarks/issues/62

/cc: @as-cii

as-cii commented 8 years ago

Nice work here! Thanks, @Ben3eeE! 💯

pdonias commented 8 years ago

Hi! Does it fix this kind of behaviour?

atombug2

Thanks for the fix anyway :)

Ben3eeE commented 8 years ago

@pdonias

booksmarks 72