Marks are reset/removed after some time
Describe the bug I work on a file, set some marks for key areas I jump around between. After a while I notice that my marks are gone, this is happening repeatedly while working with the file.
To Reproduce Steps to reproduce the behavior:
- Go to a file
- Set a couple of marks
- Continue to use the application, work for some time (maybe an hour? not quite sure)
- Try to go to previously set mark, it is now no longer there. Error message
E20: Mark not set
Expected behavior Got to the previously set mark
Screenshots If applicable, add screenshots to help explain your problem. If remapping-related, please attach log output: https://github.com/VSCodeVim/Vim#debugging-remappings. N/A
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.8.1
- VSCode version: Version 1.34.0 (1.34.0)
- OS: macOS 10.14.5
I also have this problem. I get the feeling that marks changes line as well. I have just experienced it with a upppercase mark if that's relevant.
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.12.4
- VSCode version: Version 1.41.1
- OS: Windows 10
I have the same problem. When I quit vscode, all marks are unused.
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.14.5
- VSCode version: Version 1.42
- OS: Windows 10
Strange behaviour:
- [edit:] the file begins in a saved state
- set a mark
- insert mode: type something
- press Ctrl + Z (undo)
- [edit:] the above undo step brings the file back to its saved state
- press Escape
And poof, the mark is gone.
More complex cases happen but this is the minimal reproduction.
Environment:
- Extension (VsCodeVim) version: 1.19.3
- VSCode version: Version 1.54.3 (user setup)
- OS: Windows 10
Update: the bug happens both when connected to WSL2 Ubuntu 20, and also when working on native Windows files.
@2jacobtan Just to confirm, are you using VSCode's undo, or VSCodeVim's undo?
VSCode's undo.
VSCodeVim's undo doesn't cause such a bug :D
(Update: the bug happens both when connected to WSL2 Ubuntu 20, and also when working on native Windows files.)
Happens with .txt and .md files too.
I did more testing, and a necessary condition is that the file begins in a saved state.
When Ctrl+Z (VSCode undo) undoes the changes until the file reverts to its saved state, pressing Escape (or many other key, for that matter) would clear all existing lowercase marks (uppercase marks unaffected).
It seems marks are lost when the file is modified by an external tool like a code formatter and vscode reloads the file content.
Has anyone found a solution to this issue yet? The marks keep auto resetting after a short period of time
It also seems that marks aren't saved to disk like registers. So marks are lost too after Reload Window.
I also have this issue my marks disappear :c, I use "VSCode's undo" because it can undo just words instead of whole lines (vim's undo), and the UI updates accordingly when undoing or redoing.
Also related to this issue https://github.com/asvetliakov/vscode-neovim/issues/636
Any resolution? This is still happening - and with a variety of actions. Delete a line. Undo. Open a new line. All kinds of things. I've noticed this in PHP, though haven't been paying attention in other files.
Still the same :(
I fixed this for global marks as I don't really use local marks much but I do really rely on global ones, should I open a PR?
Also apologies if the code is bad I haven't worked with extensions before, I just really wanted this fixed
It looks like someone else may have to pick up the work on this PR: https://github.com/VSCodeVim/Vim/pull/8575
I can finish it up sorry I kind of forgot about this