atom / bookmarks

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

Shift + F2 should select text #94

Closed rsese closed 5 years ago

rsese commented 6 years ago

From @alexandernst on November 30, 2017 10:37AM CDT - copied from atom/atom#16300

Prerequisites

Description

Holding Shift while jumping to a bookmark doesn't select the text.

Steps to Reproduce

  1. Open any file with text/code inside
  2. Go to any line and create a bookmark
  3. Now go a few lines below the bookmark
  4. Press and hold Shift and hit F2

Expected behavior: All the lines between where the cursor was the momento I pressed F2 and where the bookmark is should be selected.

Actual behavior: The cursor moved to the bookmark but the text wasn't selected.

Reproduces how often: 100%

Versions

Any version.

rsese commented 6 years ago

From @rsese on November 30, 6:00PM CDT

Thanks @alexandernst 👍 Since https://github.com/atom/bookmarks/pull/91 was added, it looks like this works in the case where there's a bookmark below where your cursor is:

'atom-text-editor':
  'shift-f2': 'bookmarks:select-to-next-bookmark'

But not the case you described above where the next bookmark wraps past the end of the file. I think we should maybe move this to https://github.com/atom/bookmarks? I can do that later tonight if you don't get to it.

rsese commented 6 years ago

Going to tentatively mark as a bug because if you have a single bookmark in the middle of a file and your cursor is below that bookmark, if you then run Bookmarks: Jump to Next Bookmark, that command will wrap past the end of the file. Seems like Bookmarks: Select to Next Bookmark would do the same?

Note that Bookmarks: Select to Next Bookmark will be available in 1.24 I believe.