fzf-tab: [BUG] Cursor moves up on failed completion
In some environments, when I press tab and there is no valid completion, the cursor moves upwards.
This is a recording demonstrating the problems:
https://asciinema.org/a/PlF3DoOIeIQQRwpG40K2o5cpw
In this recording, I first ssh into a Raspberry pi. Some parts of the prompt looks broken because I use Nerd Fonts glyphs, which work fine for me, but it seems asciinema doesn’t understand them.
I first try some working competions, then I try to complete fjdkls
, which is invalid, and when I press tab, the problem occurs: “no matches for files
” is correctly displayed but the cursor moves upward, and when I press tab again the cursor moves up again, also other text also moves upwards, erasing the text that was there.
Environment:
- OS: Raspbian GNU/Linux 9 (stretch)
- zsh version: 5.3.1 (arm-unknown-linux-gnueabihf)
uname -a
Linux alternative-pi-hole 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux
The problem only occurs when I combine three things:
- Raspbian 9 (I can’t reproduce it on Raspbian 10)
- When I use fzf-tab (if I remove that, completion works fine)
- When I use the prompt Powerlevel10k with two lines (it does not happen with one line powerlevel10k prompt).
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 24 (8 by maintainers)
I had a similar issue where the prompt was moving upwards and “eating” lines above it when using with a multiline prompt, disabling
COMPLETION_WAITING_DOTS
foroh-my-zsh
in the.zshrc
solved it for me. Not sure if related to this, as it was also eating lines when successfully completing something not only when it failed. But just in case that helps anyone as I was searching what causes this for a very long time 😬Encountered the same issue with powerline10k theme. Also found that cursor would will move up when there is completion candidates but abort with C-c or C-g or Esc.
PS: zsh 5.8 (x86_64-suse-linux-gnu)
Facing the same issue on M1 Macbook Pro
It seems that fzf-tab is loaded after zsh-autosuggestions.
Please ajust the order and try again. If it still happens, please give me the output of
C-x .
again.