bug: haunt.nvim creates bookmark entries in multiple json files, opens only one file? #75
Labels
No labels
autorelease: pending
autorelease: tagged
bug
ci/cd
documentation
duplicate
enhancement
good first issue
help wanted
improvement
invalid
priority
high
priority
low
question
refactor
size
L
size
M
size
S
size
XS
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
noe.trevino/haunt.nvim#75
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Did you check docs and existing issues?
Neovim version (nvim -v)
0.12.1
Operating system/version
Arch Linux
Describe the bug
Haunt seems to create double entries in multiple json files:
My
~/.hauntdirectory:34545a7a603d.json:
6b26a8cd99c7.json:
Steps To Reproduce
~/.hauntExpected Behavior
I expect bookmarks to exist in one .json file, or multiple (one per file?) but not the same entries in multiple files.
Repro
Actually, this is worse than originally documented: When
nvimcloses, and/or restarts, then listing your bookmarks, lists the bookmarks from just one of these files. I just restarted with the above, and only two bookmarks show up, instead of all four.Okay, I have pinpointed the issue. It happens when either you switch branches, or
:cdinto a different directory. Basically any context change. The in memory bookmarks don't 'know' that the context has changed, and will save to that new context.I have to think about how I am going to want to solve this. The directory switch fix is going to be simple, but I need to think about how git branch changes are going to be picked up. I don't know if I am going to want to check if the branch has changed on every single save. I will revisit this soon!
Fixed by:
6d9cf9b