junegunn / fzf.vim

fzf :heart: vim
MIT License
9.63k stars 585 forks source link

FZF terminal window does not seem to clear completely or have weird input behavior on windows #1011

Open rivten opened 4 years ago

rivten commented 4 years ago

I can repro the issue on Windows 10 Enterprise 1703 (OS Version 15063.2108). I can repro with Vim8.1 launched from cmder and cmd.exe, with nvim0.5.0 launched from cmder and cmd.exe, with GVim8.1 and nvim-qt 0.5.0 (it also repro with 0.4.3).

The behavior is that there is weird input going on while typing in fzf search bar. Sometimes, when I type certain letters (I could identify 'a' and 'd' for which it seems to happen more regularly), the letter gets erased after I type another letter. The most common seen behavior is when I hit backspace to delete letters from the search bar, some '^ H' (hat H) gets inserted in the search bar. Here is a screenshot of the behavior :

fzf

In there (neovim launched from cmder, but same behavior in all other cases as stated), you can see that the '^ H' stays even if the cursor is now before it.

There is also sometimes where the results part of the windows does not seem to clear themselves properly when going up and down.

fzf2

Here you can see that the '>' is in several places, as well as the '~\' prefix for the search bar is not where it should be.

All those screenshots were taken with the minimum config vimrc file given. One last thing that might be of importance is that, on neovim, when I hit 'checkhealth' I get the following message :

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~

This is not an error, but the '^ H' is exactly what I see when I hit backspace. I don't know if that's valuable but here it is.

If you need any other detail for my setup I would gladly help. Thanks a lot everybody and have a great day.

rivten commented 4 years ago

Adding a detail that I just discovered : this does not repro when using :FZF (I get a normal behavior) but does repro when using :Files

bkloster commented 4 years ago

Phew, I'm not the only one. I thought I had configured something wrong.

I could reproduce this with both NeoVim v0.5.0-539-g91e41c857 and vim 8.1 on Windows 10. Even with a minimal vimrc that only installs fzf and fzf.vim via plug.

baysmith commented 4 years ago

I think I may be seeing the same issue. In my case, it seems to be an issue with the preview window. Like the preview is interrupting input causing a loss of some keystrokes. When I disable previews with let g:fzf_preview_window='', the input problem does not happen.