junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
63.4k stars 2.36k forks source link

Bug: esc/ctrl+[ is more delay than ctrl-c to exit fzf? #3720

Closed tmpm697 closed 4 months ago

tmpm697 commented 4 months ago

Checklist

Output of fzf --version

0.45.0

OS

Shell

Problem / Steps to reproduce

I don't know how to reproduce this but when i press ctrl+c to exit fzf, it's faster than ctrl+[ or esc, and default ctrl+[ will be mapped to esc which then user can't change this default behavior --> it's bad.

I tried to map like --bind=ctrl+t:abort \ --> which produce the same as ctrl-c --> fast exit fzf.

so default ctrl+[ or esc is not :abort action in fzf

so we should allow user to re-map ctrl+[ and esc to :abort in fzf or just default them to.

junegunn commented 4 months ago

Duplicate of https://github.com/junegunn/fzf/issues/2052. You can try setting ESCDELAY to a small value, even to 0. It's probably fine on modern terminal emulators.

junegunn commented 4 months ago

default ctrl+[ will be mapped to esc which then user can't change this default behavior

They are identical on terminals.