Code Monkey home page Code Monkey logo

Comments (5)

keith avatar keith commented on August 21, 2024

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:

screen shot 2017-07-21 at 11 14 15

My integration looks like this:

fuzzy_git_status_widget() {
  trap "" INT

  result="$(git status --short | cut -c4- | ./fzy)"
  if [ -n "$result" ]; then
    LBUFFER="${LBUFFER}\"$(trim_quotes $result)\""
  fi

  zle redisplay
  trap INT
}

zle     -N   fuzzy_git_status_widget
bindkey '^F' fuzzy_git_status_widget

from fzy.

keith avatar keith commented on August 21, 2024

I think ideally we could solve this here the one problem right now is that each character is handled individually

from fzy.

keith avatar keith commented on August 21, 2024

A possible hack fix for this is to pretend like these are keybindings. This patch works for me locally:

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

from fzy.

keith avatar keith commented on August 21, 2024

I've created a PR with this approach for discussion: #45

from fzy.

jhawthorn avatar jhawthorn commented on August 21, 2024

Fixed in 59d80ed. Thanks

from fzy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.