Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
garyking opened this issue Jul 14, 2023 · 10 comments
Assignees

Comments

@garyking
Copy link

Environment/version

  • Extension version: 13.4.1
  • VSCode version: 1.80.1
  • OS version: MacOS 13.4.1 (22F82)

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

@garyking garyking added the bug label Jul 14, 2023
@alefragnani
Copy link
Owner

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:

  • A missing file
  • A smaller file (less lines) and the bookmark is located after its end

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
Copy link
Author

  • In the screenshot, I have a VS Code workspace open.
  • Bookmarks: List command says "No Bookmarks found."
  • Bookmarks: Clear from all files works. So I'll just use that in the future, thanks. Although I wouldn't want to use this command if I have several bookmarks in a workspace, and don't want my real bookmarks to be cleared.

@alefragnani
Copy link
Owner

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
Copy link

svivian commented Jul 25, 2023

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
Copy link

me ,too
i just open theca case.
bb

@mariogogo123
Copy link

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

@mariogogo123
Copy link

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
Copy link

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

@zapateo
Copy link

zapateo commented Mar 21, 2024

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
Copy link

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

microsoft/vscode#210640

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants