Closed wbfw109 closed 1 year ago
Hi @wbfw109 ,
Once you delete a bookmarked line, the bookmark is deleted as well. If the current workspace doesn't have any bookmark, the .vscode\bookmarks.json
file is deleted as well, because it would be empty anyway, which has no purpose. This behavior was added in #51.
The Undo operation, on the other hand, works as expected. It won't bring back the deleted bookmark, because the extension does not support undo operation for bookmarks. Just like it won't undo any bookmark operation (like toggling or changing its label), when you hit Undo. Looking closer, I don't see VS Code providing any Undo API that I could attach the operations. So, to have such feature, it should be developed completely inside the extension.
Hope this helps
Hi @wbfw109 ,
Once you delete a bookmarked line, the bookmark is deleted as well. If the current workspace doesn't have any bookmark, the
.vscode\bookmarks.json
file is deleted as well, because it would be empty anyway, which has no purpose. This behavior was added in #51.The Undo operation, on the other hand, works as expected. It won't bring back the deleted bookmark, because the extension does not support undo operation for bookmarks. Just like it won't undo any bookmark operation (like toggling or changing its label), when you hit Undo. Looking closer, I don't see VS Code providing any Undo API that I could attach the operations. So, to have such feature, it should be developed completely inside the extension.
Hope this helps
I found that saved bookmarks no longer available when file was renamed even though maybe it following git version control system. I've tried directly changing .vscode/bookmarks.json, but it automatically reverts to the old bookmarks file contents.
@wbfw109 ,
If you rename/move the file outside VS Code, the bookmarks are not updated. The extension depends entirely on VS Code API/events to do that.
Updating the .vscode/bookmarks.json
file manually will take no effect, if you have the relative window open in VS Code. This is not a two-way binding storage. The extension won't keep looking for changes on that file, to update the bookmarks on the fly. Quite the opposite, it is just a storage.
If you need for any reason, update the .vscode/bookmarks.json
manually, you have at least two alternatives:
Just remember to previously close the VS Code instance that refers to that file/project, otherwise it will be overwritten again.
Hope this helps
Environment/version
Steps to reproduce with setting.json "files.autoSave": "off", // (Default) "bookmarks.saveBookmarksInProject": true,
please fix it 👍