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] - Bookmark for the same file stored more than once #416

Closed
marmidr opened this issue Mar 18, 2021 · 3 comments
Closed

[BUG] - Bookmark for the same file stored more than once #416

marmidr opened this issue Mar 18, 2021 · 3 comments
Labels
bug caused by vscode The issue was caused by a VS Code update wontfix

Comments

@marmidr
Copy link

marmidr commented Mar 18, 2021

Environment/version

  • Extension version: v13.0.4
  • VSCode version: 1.54.3
  • OS version: OS | Linux x64 4.4.0-19041-Microsoft, Remote | WSL: Ubuntu

Hi,
VSCode has a little issue - files are opened with relative or absolute path, especially when navigating through the code.
I noticed that my bookmarks disappeared, but later realized that on sidebar the same file is listed twice, like so:
1st: /home/user/Proj/src/parser.cpp
2nd: ../src/parser.cpp

Maybe convert path from Code to its absolute form before storing? Just imagine what happened, when I created symbolic link to project directory and used it to open project. Even more weird path cases :)

@marmidr marmidr added the bug label Mar 18, 2021
@alefragnani
Copy link
Owner

Hi @marmidr ,

As you noticed, this is a VS Code behavior. Prior to the latest release of the extension (v13), I would say this workaround could be easily added, but I don’t see this happening so easily anymore. To be able to support Remotes, I had to use relative paths, because depending on how you opened the folder (locally or remotely), the root folder changes. So I combine both to identify the files

I’ll take a closer look if something can be done, but supporting Remotes is the priority .

Hope this helps

@alefragnani alefragnani added the caused by vscode The issue was caused by a VS Code update label Mar 20, 2021
@marmidr
Copy link
Author

marmidr commented Mar 22, 2021

Thanks for the answer.
Obviously, something trivial from user perspective may be complex from developer PoV.
Thanks for your job ;)

@alefragnani
Copy link
Owner

I’m closing this issue because it is caused by how VS Code works, with no feasible workaround.

But, maybe using a global storage as requested in #287 this could be achieved, because in the end, the bookmark will be relative to a file in the file system, not in the opened workspace.

Thanks for your understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug caused by vscode The issue was caused by a VS Code update wontfix
Projects
None yet
Development

No branches or pull requests

2 participants