-
Notifications
You must be signed in to change notification settings - Fork 946
Prompt with newline causes previous lines to be deleted when tab autocompleting #668
Comments
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? |
I'm also experiencing this exact issue for tab-completions and happy to help debug if needed. my .zshrc
|
Wow... that's horrible. I am also on macOS, with ZSH 5.4.2, running latest OMZ and the 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
|
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 |
@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
then |
@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. My .zshrc:
And my .zpreztorc:
|
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 |
@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 |
|
@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 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:
The text was updated successfully, but these errors were encountered: