Fix bookmarked range duplication bug #72

Merged
merged 2 commits into from Oct 31, 2016

Projects

None yet

3 participants

@Ben3eeE
Member
Ben3eeE commented Oct 30, 2016 edited

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 #62.

Gif of behavior after the change:
bookmarks fix

Alternate Designs

N/A

Benefits

  • Makes bookmarks behave more like sublime.
  • Adds a test for this behavior.

Possible Drawbacks

Someone depends on the current behavior.

Applicable Issues

Fixes #62

/cc: @as-cii

Ben3eeE added some commits Oct 30, 2016
@Ben3eeE Ben3eeE Fix bookmarks duplication bug 75244e3
@Ben3eeE Ben3eeE Add specs
b4c73cd
@as-cii as-cii merged commit 27b2eaa into master Oct 31, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@as-cii as-cii deleted the b3-fix-bookmarked-range branch Oct 31, 2016
@as-cii
Member
as-cii commented Oct 31, 2016

Nice work here! Thanks, @Ben3eeE! 💯

@pdonias
pdonias commented Oct 31, 2016

Hi! Does it fix this kind of behaviour?

atombug2

Thanks for the fix anyway :)

@Ben3eeE
Member
Ben3eeE commented Oct 31, 2016

@pdonias

booksmarks 72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment