cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.85k stars 178 forks source link

F2 shortcut doesn't work in kitty terminal #155

Closed vlaci closed 3 years ago

vlaci commented 3 years ago

It doesn't work in the ^R widget and also doesn't work when just start mcfly search. I have tried in bash and zsh so doesn't seem to be shell specific. It works fine when I am using from xterm though. F2 key also works for other applications, such as mc.

After digging through the history of zsh integration I stumbled upon that changing the following line https://github.com/cantino/mcfly/blob/eac2d68c9e83e6400fa7b236935a53b5431db5b9/mcfly.zsh#L68 to tput init fixes at least the widget for me.

Changing the binding in the source to something else which isn't involving an Fn key also works. Only the Fn keys seem to be non-functional.

Do you have any idea how to debug this issue further?

P.S: I am on NixOS (linux), using kitty 0.20.3, tried mcfly 0.5.6 and also tried building from eac2d68

kovidgoyal commented 3 years ago

See https://github.com/kovidgoyal/kitty/issues/3586

vlaci commented 3 years ago

@kovidgoyal I can confirm that the issue doesn't appear when I compiled kitty from https://github.com/kovidgoyal/kitty/commit/efb0f6f24af85189fd107058ea32bcc764d4fd55