Open Mellbourn opened 3 years ago
Can you give me the output of C-x .
when there is no valid completion? eg. ls asdsad<C-x .>
cat /tmp/zsh-23324-fzf-tab-1.log
+fzf-tab-debug:9> : zsh 5.3.1
+fzf-tab-debug:10> zle .fzf-tab-orig-expand-or-complete
+fzf-tab-debug:11> unsetopt xtrace
Ummm, strange. What's the value of $widgets[.fzf-tab-orig-$_ftb_orig_widget]
.
echo $widgets[.fzf-tab-orig-$_ftb_orig_widget]
user:_zsh_autosuggest_bound_1_expand-or-complete
It seems that fzf-tab is loaded after zsh-autosuggestions.
NOTE: fzf-tab needs to be loaded after compinit, but before plugins which will wrap widgets, such as zsh-autosuggestions or fast-syntax-highlighting
Please ajust the order and try again. If it still happens, please give me the output of C-x .
again.
I tested moving around the loading of fzf-tab
, including before zsh-autosuggestion and fast-syntax-highlighting, but it did no difference. The output of C-x .
changed to this
❯ cat /tmp/zsh-28836-fzf-tab-1.log
+fzf-tab-debug:9> : zsh 5.3.1
+fzf-tab-debug:10> zle .fzf-tab-orig-fzf-completion
+fzf-tab-debug:11> unsetopt xtrace
Then what's the value of echo $widgets[.fzf-tab-orig-$_ftb_orig_widget]
?
echo $widgets[.fzf-tab-orig-$_ftb_orig_widget]
completion:.expand-or-complete:_main_complete
But this time, the trace output was 2000 lines long! I can give you access to it, but I'm not sure of the best way to give it to you.
You can upload the file here.
There you go: zsh-32478-fzf-tab-3.log
To be honest, I can't figure out why.
Does it happen on the newer version of zsh?
Nope.
The problem occurs on a Raspberry Pi 3 with zsh 5.3.1.
uname -a
Linux alternative-pi-hole 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux
I have a Raspberry Pi 4 with zsh 5.7.1 that does not have the problem.
uname -a
Linux raspberrypi4docker 5.10.17-v8+ #1403 SMP PREEMPT Mon Feb 22 11:37:54 GMT 2021 aarch64 GNU/Linux
I can't get a newer zsh on the Raspberry pi 3, unfortunately.
Facing the same issue on M1 Macbook Pro
I'm getting this issue too on m1
@lminer what's the zsh version on m1?
Actually, I'm a complete idiot. It runs fine. Sorry!
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)
Having the cursor problem now with zsh and powerline 10k Darwin XXXXXX 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_X86_64 x86_64
sorry for the necrobump
@jameshounshell What's your p10k configuration?
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
for oh-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 :grimacing:
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 😬
This helped me, thank you!
Was also having this problem but tried to diagnose it and got a little headway: I'm using a modification of the OMZ zeta theme.
The relevant code is something like:
function get_space {
local str=$1$2
local zero='%([BSUbfksu]|([FB]|){*})'
local len=${#${(S%%)str//$~zero/}}
local size=$(( $COLUMNS - $len - 1 ))
local space=$(printf "%${size}s")
echo $space
}
function print_prompt_head {
local left_prompt="$(funcsForLeftPrompt)"
local right_prompt="$(funcsForRightPrompt)"
print -rP "$left_prompt$(get_space $left_prompt $right_prompt)$right_prompt"
}
PROMPT='$(print_prompt_head)
$(get_prompt_indicator)'
By remove the -P
prompt expansion flag from the print
function, it solves the problem:
print -r "$left_prompt$(get_space $left_prompt $right_prompt)$right_prompt"
In this particular theme, it has the downside that it clobbers the terminal on resize but hopefully this helps in debugging.
@Aloxaf Should we include the tip from @SuperTux88 about COMPLETION_WAITING_DOTS
to the readme? I also stumbled on this and spent some time trying to solve it by rearranging plugins (to no avail) until this solved it for me
(excellent plugin btw ❤️ )
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 forfiles
" 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:
The problem only occurs when I combine three things: