Closed dededecline closed 6 years ago
Hey @danielhklein! I'm using an almost identical system, and can't seem to reproduce the issue with your newline settings. Can you share a screenshot so we can get a better idea of what's happening?
Hi @bhilburn thanks for the response, I uploaded a gif of the issue in action
I'm also experiencing this exact issue for tab-completions and happy to help debug if needed.
Wow... that's horrible. I am also on macOS, with ZSH 5.4.2, running latest OMZ and the next
branch of P9k, and don't see this behavior. Additionally, there doesn't seem to be any really obvious things in your zshrc
s that might be causing this.
I am on iTerm 3.0.15 - I wonder if something changed in a more recent version? @jordanweaver, what version of iTerm are you using?
If lots of people were seeing this issue, I would expect to have a lot more reports. I have to assume that there is something small, here, causing the problem.
How did you both install zsh, by the way?
(By the way, sorry for the slow response, here, everyone. I'm back and ready to solve this problem with you =)
)
Hey @bhilburn I have zsh installed via homebrew
> which zsh
/usr/local/bin/zsh
> brew list | grep zsh
zsh
zsh-syntax-highlighting
I'm using iTerm2 Build 3.1.5. It's been a while but I think I have oh-my-zsh from source (likely following these instructions) and using the system zsh
:
@bhilburn @jordanweaver I've got an update, I've managed to get the issue to stop. I'll look later for root cause but commenting out
COMPLETION_WAITING_DOTS="true"
then source ~/.zshrc
and restarting iTerm fixed the issue for me
@danielhklein - Wow! Thanks so much for the update! I'm so happy you were able to find a fix. I actually have the waiting dots turned on, too, and don't see that issue. What a bizarre bug.
I'm going to add this to our troubleshooting wiki. Thanks for sharing your fix =)
I have the same issue, but i am using Prezto.
I have this issue when the rprompt newline is set to false
POWERLEVEL9K_RPROMPT_ON_NEWLINE=false
When i set it to true it works fine May be this helps.
@danielhklein you saved me
@phisco Could you help with debugging this?
() {
echo ZSH_VERSION=$ZSH_VERSION
echo ZSH_PATCHLEVEL=$ZSH_PATCHLEVEL
[[ -n $terminfo[rmam] ]] && echo "rmam supported"
[[ -n $terminfo[smam] ]] && echo "smam supported"
if [[ -n $terminfo[rmam] && -n $terminfo[smam] ]]; then
echoti rmam || echo "error: echoti rmam"
echoti smam || echo "error: echoti smam"
fi
echo "expand-or-complete: $widgets[expand-or-complete]"
echo "redisplay: $widgets[redisplay]"
}
TRAPALRM() { zle redisplay; unset TMOUT }
TMOUT=1
TRAPALRM() { zle .redisplay; unset TMOUT }
TMOUT=1
ZSH_VERSION=5.3
ZSH_PATCHLEVEL=zsh-5.3-0-g4cfdbdb
expand-or-complete: user:_zsh_highlight_widget_orig-s0.0000030000-r3094-expand-or-complete
redisplay: user:_zsh_highlight_widget_orig-s0.0000030000-r3094-redisplay
@phisco Thanks! This is useful.
Let's see if this patch will fix it. Please run the following command. Copy-paste it exactly, including the leading and trailing parentheses.
(
cd $ZSH
git apply <<END
diff --git a/lib/completion.zsh b/lib/completion.zsh
index c7db2eb7..a7126217 100644
--- a/lib/completion.zsh
+++ b/lib/completion.zsh
@@ -66,6 +66,7 @@ if [[ \$COMPLETION_WAITING_DOTS = true ]]; then
[[ -n "\$terminfo[rmam]" && -n "\$terminfo[smam]" ]] && echoti smam
zle expand-or-complete
+ zle -R
zle redisplay
}
zle -N expand-or-complete-with-dots
END
)
Then put COMPLETION_WAITING_DOTS=true
in your ~/.zshrc
and restart zsh. Does it fix the issue you had? If it does, I'll send a PR to oh-my-zsh so that it's fixed for everyone.
Once you are done testing, you can revert the patch with this command:
(
cd $ZSH
git checkout -- lib/completion.zsh
)
@phisco Thanks! This is useful.
Let's see if this patch will fix it. Please run the following command. Copy-paste it exactly, including the leading and trailing parentheses.
( cd $ZSH git apply <<END diff --git a/lib/completion.zsh b/lib/completion.zsh index c7db2eb7..a7126217 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -66,6 +66,7 @@ if [[ \$COMPLETION_WAITING_DOTS = true ]]; then [[ -n "\$terminfo[rmam]" && -n "\$terminfo[smam]" ]] && echoti smam zle expand-or-complete + zle -R zle redisplay } zle -N expand-or-complete-with-dots END )
Then put
COMPLETION_WAITING_DOTS=true
in your~/.zshrc
and restart zsh. Does it fix the issue you had? If it does, I'll send a PR to oh-my-zsh so that it's fixed for everyone.Once you are done testing, you can revert the patch with this command:
( cd $ZSH git checkout -- lib/completion.zsh )
I tried applying the patch and I am afraid it didn't solve the issue, was this issue eventually fixed at some point?
When I have at least one of
enabled in my zshrc, I experience an issue when using tab autocompletion where it will redraw the prompt, but it will cover up the preceding line.
Specs: MacOS 10.13.1, iTerm2 Build 3.1.5, zsh 5.4.2, latest version of master for both oh-my-zsh and powerlevel9k.
My .zshrc: