Skip to content

Conversation

XYenon
Copy link
Contributor

@XYenon XYenon commented Sep 25, 2024

No description provided.

@xfzv
Copy link

xfzv commented Sep 25, 2024

Interesting. I'm having a similar issue: I'm using

[[manager.prepend_keymap]]
on = ["<Backspace>"]
run = 'shell "kitten run-shell kitty @ set-tab-title "Yazi terminal" ; kitty @ set-tab-title "Yazi"" --block --confirm'
desc = "Open shell here"

and when pressing <Backspace> for too long while in the input field, this keybinding is triggered and I'm brought into a shell.

This is annoying.

@sxyazi
Copy link
Owner

sxyazi commented Sep 25, 2024

Why not use <C-u> if you want to clear the whole input?

# Kill
{ on = "<C-u>", run = "kill bol", desc = "Kill backwards to the BOL" },

It's a more convenient and direct way, so you don't have to keep hitting <Backspace>. If you're in normal mode, you can also just c => c

@xfzv
Copy link

xfzv commented Sep 25, 2024

I'm aware of this binding but I'm just so used to <Backspace> for some reason. I'll try to adopt it I guess.

@XYenon
Copy link
Contributor Author

XYenon commented Sep 25, 2024

I'm not always decide to delete all content when I start to delete them. Usually when I have deleted half of the content, I realized the rest of them is wrong too, so I'll keep backspace to delete all of them.

@sxyazi
Copy link
Owner

sxyazi commented Sep 25, 2024

I just got another report about this issue: #1681. It seems like enough people are bothered by this behavior, so I think we can just remove it since it's a breaking change anyway, and it's also hard to come up with a way (like warnings) to prompt users with the existing backspace --under config to replace it

@XYenon
Copy link
Contributor Author

XYenon commented Sep 25, 2024

What about change this option to --no-close to make it not break?

@sxyazi
Copy link
Owner

sxyazi commented Sep 25, 2024

No, just remove it - if enough people are bothered by it, then its worth breaking.

I'll also keep this PR open for a while to see if there are any differing opinions

@sxyazi sxyazi changed the title feat: make backspace command support not closing the input when value is empty feat!: make backspace command not close the input even when value is empty Oct 2, 2024
Copy link
Owner

@sxyazi sxyazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sxyazi sxyazi merged commit a96c60c into sxyazi:main Oct 2, 2024
6 checks passed
@XYenon XYenon deleted the feat/backspace branch October 3, 2024 03:10
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants