-
Notifications
You must be signed in to change notification settings - Fork 126
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
fzy should ignore bracketed paste characters. #42
Comments
I get this case as well, for example if I copy the title of this issue, and paste it in my shell I see this: My integration looks like this:
|
I think ideally we could solve this here the one problem right now is that each character is handled individually |
A possible diff --git i/src/tty_interface.c w/src/tty_interface.c
index 9bc732b..db4bef1 100644
--- i/src/tty_interface.c
+++ w/src/tty_interface.c
@@ -152,6 +152,8 @@ static void action_prev(tty_interface_t *state) {
choices_prev(state->choices);
}
+static void action_ignore(__unused tty_interface_t *state) {}
+
static void action_next(tty_interface_t *state) {
update_state(state);
choices_next(state->choices);
@@ -236,6 +238,8 @@ static const keybinding_t keybindings[] = {{"\x7f", action_del_char}, /* DEL */
{"\x1bOB", action_next}, /* DOWN */
{"\x1b[5~", action_pageup},
{"\x1b[6~", action_pagedown},
+ {"\e[200~", action_ignore},
+ {"\e[201~", action_ignore},
{NULL, NULL}};
#undef KEY_CTRL |
I've created a PR with this approach for discussion: #45 |
Fixed in 59d80ed. Thanks |
Zsh since 5.1 have a bracketed-paste support. When I run fzy via hotkey, and paste anything, additional characters are pasted into the output.
The zsh snippet:
fzf seems to ignore[1] them, how about fzy dropping them too?
[1] junegunn/fzf@b8737b7
The text was updated successfully, but these errors were encountered: