Implement ranged single- and multi-line bookmarks#47
Implement ranged single- and multi-line bookmarks#47kuychaco merged 4 commits intoatom:masterfrom Tyriar:9_ranged_bookmarks
Conversation
Have bookmarks remember their column and row instead of just row and also keep track of their ending position. Fixes #9
lib/bookmarks-view.coffee
Outdated
There was a problem hiding this comment.
Now that there's bookmarkEndRow, I think it would be better to explicitly name this bookmarkStartRow.
|
Ping? |
spec/bookmarks-view-spec.coffee
Outdated
| atom.commands.dispatch editorElement, 'bookmarks:toggle-bookmark' | ||
|
|
||
| editor.setCursorBufferPosition([10, 0]) | ||
| editor.setSelectedBufferRanges([[[8, 4], [10, 2]]]) |
There was a problem hiding this comment.
Since line 10 is empty, could you change this range to end at [10, 0]? This would then be consistent with the tests on lines 217, 231, 237, and 242.
|
@Tyriar this looks great! I added a few minor comments to the diff. Once you take care of those I'll gladly merge this PR. Thanks for the good work. |
|
@kuychaco done |
Implement ranged single- and multi-line bookmarks
|
Sweet, thanks @Tyriar 👍 |
|
This PR doesn't make any sense. Without the selected sections being highlighted, it's pointless. All you get is a range in your bookmarks list (ie: atom-environment.coffee:9-11). Unless your lines are a million characters long, it isn't hard to spot what you need on a bookmarked line. From the editor view, it does the same thing as adding multiple bookmarks at the same time (ie: bookmarking line 4, 5 and 6). If this PR is stopping us from having the entire bookmarked line itself highlighted, then I vote for reversing this PR. Having the highlighted line is way more important (and desired feature) than this! When you have a really long file full of code, it makes it very helpful to have the lines highlighted so you can spot them when scrolling through it. It's nearly impossible to spot the tiny bookmark icon in the gutter when scrolling through a 5,000 line file. |
Have bookmarks remember their column and row instead of just row and also keep
track of their ending position.
Fixes #9
Jumping forward/back:
Toggling:
Bookmark view with multi-line bookmarks: