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 161 forks source link

[BUG] - Badge on bookmark icon in sidebar shows there are bookmarks, but there's really none #630

Open garyking opened 12 months ago

garyking commented 12 months ago

Environment/version

Steps to reproduce

Per my screenshot below, the badge says there are two bookmarks, but there are really none. In another one of my projects, the badge says 1 but there's no bookmarks. If I add a bookmark, then the badge increases from 2 to 3, and the bookmark appears fine in the sidebar. But again, the count is 2 higher than it should be.

Bookmarks - VSC - Screenshot

alefragnani commented 12 months ago

Hi @garyking ,

What do you have currently open? A folder, a workspace (multi-root folder) or just random files (no folder)?

Also, how many bookmarks appears if you use the Bookmarks: List command? Maybe the previous session had bookmarks, but when you reopened, they weren't found. There are two reasons why a bookmark could be not found:

In this case, the List command (and the Treeview) would ignore those bookmarks. Could you try cleaning the bookmarks using the Bookmarks: Clear from All Files command, to see if the badge resets?

Hope this helps

garyking commented 12 months ago
alefragnani commented 12 months ago

I could reproduce this behavior with the "A smaller file (less lines) and the bookmark is located after its end" scenario. The missing file scenario, on the other hand, presented a small difference (visually speaking).

I'll reopen the issue, in order to take a closer look and fix it. The number in the badge should reflect the number of valid bookmarks.

Thanks for reporting

svivian commented 11 months ago

I had this issue when I closed a file with bookmarks. It had 3 bookmarks and the notification said 3 as expected, when I closed the file it still said 3 but opening the bookmarks sidepanel just said "No bookmarks".

mariogogo123 commented 10 months ago

me ,too i just open theca case. bb

mariogogo123 commented 9 months ago

I would appreciate it if you could fix this bug, which is not displaying the label, as soon as possible. image

mariogogo123 commented 9 months ago

I have identified the timing of the occurrence. For scripts connected directly to the server via SSH, the labeling feature is not functioning correctly.

For others, it is working as expected.

mariogogo123 commented 9 months ago

When I updated to the latest revision, the bug had been resolved. thanks

zapateo commented 3 months ago

I'm experiencing the same issue with Bookmarks v13.4.2 (on Fedora Linux, codium version 1.87.2), after that a file with a bookmark on it has been renamed by a git commit.

The bookmarks list was empty, while the badge was still "1".

The command Bookmarks: Clear from All Files resolved the problem, but I may expected the extension to automatically detect the inconsistency.

(anyway, thanks for this very useful extension!)

gjsjohnmurray commented 2 months ago

@zapateo this may be caused by a recent VS Code regression that I have just submitted a PR to fix:

https://github.com/microsoft/vscode/issues/210640