lincheney / fzf-tab-completion

Tab completion using fzf
GNU General Public License v3.0
652 stars 41 forks source link

Can we remove <TAB> flick? #99

Open widogg opened 6 months ago

widogg commented 6 months ago

hi!

In my local git copy, I have commented these lines, because I don't really like to have a message when I .

However, this doesn't prevent the console to flick for an instant (or more, if the complete takes longer) when I press .

Whould it be possible to remove this behaviour? Until the last couple of days, I've been using fzf-obc and it doesn't has this behavior. Instead, FZF starts one line below current promtp (and I actually prefer this kind of behavior)

lincheney commented 6 months ago

Hi The flicker is unavoidable, it is a side effect of how bash/readline works with keybindings. I tried fzf-obc and found that it also had flicker, however it had less flicker than this repo. I will take a look to see what it is doing and see if I can apply here.

widogg commented 6 months ago

The thing that I've noticed is that fzf-obc starts one line below

(ignore the different theme) image

In this example, using autocomplete on /usr, fzf-tab has a noticeable flickr while fzf-obc doesn't. And I think is caused by "replacing" the prompt with fzf output, while obc decides to put it one line below.

While I don't have a preference on the "style" on where to put fzf (same line vs line below), it's the constant flickr that bothers me

lincheney commented 3 months ago

I had a look at this, I think the reason fzf-obc doesn't flicker as much is that it is overriding the individual completion functions rather than the completion itself. Bash must be doing something where if you are invoking normal completion it doesn't hide the prompt or something.