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

dd won't delete a file from harpoon ui in a particular case #641

Closed
asuka-405 opened this issue Oct 27, 2024 · 6 comments
Closed

dd won't delete a file from harpoon ui in a particular case #641

asuka-405 opened this issue Oct 27, 2024 · 6 comments

Comments

@asuka-405
Copy link

Bug - Using dd to delete an item sometimes won't work.
Env - telescope UI
Reproduce - delete any item from UI but instead of closing harpoon thru return key, use escape. In this case the list will persist whether you've delete a single item, or all 4.

@asuka-405 asuka-405 changed the title DD won dd won't delete a file from harpoon ui in a particular case Oct 27, 2024
@alexjjohnson91
Copy link

alexjjohnson91 commented Nov 4, 2024

I am not sure this qualifies as a bug, instead just unimplemented functionality.

If the UI is a buffer, ESC would not save the buffer, thus the item persists in the list. The <CR> saves the buffer, thus deleting the item from the list.

@asuka-405
Copy link
Author

From a user perspective:
You delete items, press escape and expect it to clear buffer.
If something does not happen as expected, I'm sure it qualifies as a bug.

@FettGoenner
Copy link

I think this is a feature, not a bug.
ESC is not exactly the "save and continue" kind of key and, as a user, I expect it to let me escape without saving my changes. This behavior is actually useful if I made bad changes.

Plus, a normal Vim buffer does not automatically save your changes upon leaving either, does it? ;)

This also happens in the default Harpoon UI without Telescope btw. The issue should be closed imo.

@asuka-405
Copy link
Author

That makes sense 😲

@mrogowski11
Copy link

What are the available methods to close the Harpoon window while preserving changes? The return key works, but it causes Vim to jump to whatever buffer was under the cursor in the Harpoon window. Harpoon's list():select and toggle_quick_menu discard the changes, as does Telescope's actions.close.

If I recall correctly, this behavior was introduced in Harpoon 2 and wasn't present in the first iteration.

@FettGoenner
Copy link

FettGoenner commented Jan 23, 2025

What are the available methods to close the Harpoon window while preserving changes?

Not an expert on this, but for me :w just works, like I am saving a normal Vim buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants