alefragnani / vscode-bookmarks

Bookmarks Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks
GNU General Public License v3.0
1.65k stars 163 forks source link

[BUG] - Expand selection to previous/next bookmark is not working anymore #598

Closed dg00GT00 closed 1 year ago

dg00GT00 commented 1 year ago

Environment/version

Steps to reproduce The correct behavior was working before but unfortunately I cannot recall the last version that it was happening.

  1. Set a bookmark in the line of a document;
  2. On the same document set another one either before or after the previous one.
  3. Call the command "Expand selection to Next/Previous"
alefragnani commented 1 year ago

Hi @dg00GT00 ,

I couldn't reproduce the error. I followed the steps you provided, and the selection is being created correctly. I have tried a few different scenarios, with the cursor being placed before, after and between the bookmarks, and everything seems to be working as expected.

A peculiar scenario (maybe the one you faced).

  1. Toggle a bookmark on one place
  2. Goes to another place (below)
  3. Toggle a bookmark in this new place
  4. Then, use the Bookmarks (Selection): Expand Selection to Previous command to select the range between both bookmarks
  5. The selection will be created
  6. Now, if you try to use the Bookmarks (Selection): Expand Selection to Next, expecting the selection to be removed, it won't be. You need to use the Bookmarks (Selection): Shrink Selection command instead

The same happens if you use Up direction in selection/toggling

Hope this helps

dg00GT00 commented 1 year ago

Hi @alefragnani, I could not also reproduce the error anymore, in the next business day. Probably that was cause due some inconsistency on the VS Code side.

Thank you