Multiple bookmarks at a point location hides all but the last#1710
Closed
ibdknox wants to merge 1 commit intocodemirror:masterfrom
Closed
Multiple bookmarks at a point location hides all but the last#1710ibdknox wants to merge 1 commit intocodemirror:masterfrom
ibdknox wants to merge 1 commit intocodemirror:masterfrom
Conversation
Signed-off-by: Chris Granger <ibdknox@gmail.com>
Member
|
Merged, and fixed in attached patch (you trampled on an existing |
Contributor
Author
|
Any thoughts on how to fix the cursor placement issue? If you put two bookmarks at the end of the line with insertLeft the cursor ends up in between them instead of after the last character. I looked into it a bit and from what I could tell the issue has to do with the way it assumes positions equate to a single measurable span. |
anaran
pushed a commit
to anaran/CodeMirror
that referenced
this pull request
Feb 22, 2014
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since bookmarks are point based and do not replace any text, they cannot technically overlap eachother and there's no reason multiple can't be shown at a point location. The current implementation of insertLineContent prevents them from being shown by assuming there's only ever one. This is another naive solution that has one problem: when there are two (or more) bookmarks the cursor is positioned in between them (as opposed to before all of them) when the insertLeft option is set true.