tommyme / vscode-bookmark-x

Drag-and-drop, grouping, sorting bookmarklet plugin
GNU General Public License v3.0
17 stars 3 forks source link

"reveal bookmark in current line" hangs #33

Open zhourrr opened 3 hours ago

zhourrr commented 3 hours ago

I am using v0.2.14.

Originally, i had a bookmark at line 4 and saved it. The saved file records the line text and number. Not sure why the line number is 3, though.

image

image

Now if I remove this bookmark and run "load all workspace state" to load from the saved json file, the bookmark is correctly pinned at line 4, as expected. But if I then immediately run "reveal bookmark in current line" on line 4, the operation hangs for a long time.

Interestingly, if after loading the bookmarks, I open the bookmarks in the sidebar and click on this bookmark, it successfully navigates to line 4. After doing this, running "reveal bookmark in current line" works without any issues. So i suspect navigating to this bookmark modified some internal states and fixes the issue.

截屏2024-11-15 11 21 04

Above is the minimal reproduction step i found, which doesn't involve bookmark misplacement as I mentioned in issue #27 .

tommyme commented 3 hours ago
zhourrr commented 2 hours ago

https://github.com/user-attachments/assets/14a64abc-4e60-49e1-9ab9-0fce12c204bb

After i run "reveal" it didn't respond. Toggle bookmark also didn't respond. And the side bar seems to be in some loop.

tommyme commented 1 hour ago

In my case, "reveal" pop up a message, but it didn't select the bookmark in tree view, and "Toggle bookmark" also didn't respond.

I think It's because before you click the "bookmark icon" on sidebar, the treeview won't render. There is some logic in it, and finally leads to error.

To avoid that, you can put "bmx View" in right side bar, or click it first. image

More detailed reason may take some time to analyse.