-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
[Harpoon 2] Duplicate list items cause all following list items to be deleted #476
Comments
This issue seems to be related to PR #573. Duplicate items are turned into blank-lines ( |
Duplicates are not allowed |
I'm going to have to think about how to solve this. We most certainly cannot have duplicate items |
@ThePrimeagen Does that go for empty lines also? In which case there would only be a single blank line left; or none, if they're not allowed?! |
Blank should be fine which should make this fix easy Next week I should get another 4 hours on harpoon, finish this off |
Steps to reproduce
I would expect this to take me to README.md on step 3, but it does not. I go to my back to the current file.
Logs
config_default#create_list_item README.md
HarpoonList:append { index = -1, item = { context = { col = 6, row = 1 }, value = "README.md" } }
ui#toggle_quick_menu#opening __harpoon_files
select by keymap '' <-- Does not work here
ui#select_menu_item selecting item 2 from { "README.md", "README.md" } options
ui#close_menu name: __harpoon_files win and bufnr { bufnr = 17, win = 1010 }
toggle by BufLeave
ui#toggle_quick_menu#closing
ui#save { "README.md", "README.md" }
ui#toggle_quick_menu#opening __harpoon_files <-- open up UI for second time
select by keymap '' <-- Works this time
ui#select_menu_item selecting item 1 from { "README.md" } options
ui#close_menu name: __harpoon_files win and bufnr { bufnr = 11, win = 1005 }
toggle by BufLeave
ui#toggle_quick_menu#closing
ui#save { "README.md" }
config_default#select { context = { col = 31, row = 7 }, value = "README.md" } __harpoon_files
Deletes items after the first duplicate
Steps to Reproduce
Same as above, but there is another list item already. So when hitting <CR>, the list looks like:
and my cursor is on the second README.md.
When I open the list back up, the list looks like:
Logs 2
ui#toggle_quick_menu#opening __harpoon_files
select by keymap ''
ui#select_menu_item selecting item 2 from { "README.md", "README.md", "file1.txt" } options
ui#close_menu name: __harpoon_files win and bufnr { bufnr = 4, win = 1002 }
toggle by BufLeave
ui#toggle_quick_menu#closing
ui#save { "README.md", "README.md", "file1.txt" }
config_default#create_list_item file1.txt
ui#toggle_quick_menu#opening __harpoon_files
select by keymap ''
ui#select_menu_item selecting item 1 from { "README.md" } options
ui#close_menu name: __harpoon_files win and bufnr { bufnr = 6, win = 1003 }
toggle by BufLeave
ui#toggle_quick_menu#closing
ui#save { "README.md" }
config_default#select { context = { col = 32, row = 7 }, value = "README.md" } __harpoon_files
The text was updated successfully, but these errors were encountered: