[Regression] vi_mode segment doesn't work in next #1201
Comments
This diff should fix vi_mode. But if the second option of #1196 (comment) is implemented this would be unnecessary. diff --git a/segments/vi_mode/vi_mode.p9k b/segments/vi_mode/vi_mode.p9k
index b9911a3..79425a8 100644
--- a/segments/vi_mode/vi_mode.p9k
+++ b/segments/vi_mode/vi_mode.p9k
@@ -232,6 +232,8 @@ function zle-keymap-select {
*) cursorShape ${P9K_CURSOR_SHAPE_DEFAULT};;
esac
fi
+ __p9k_prepare_prompts
+ zle .reset-prompt
} I will create a PR anyway since atm the segment is completely broken and |
I just noticed that Powerlevel9k in From http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html:
I don't know how many people use it, maybe none. There is https://gist.github.com/dbb/3893091, which seems to do the same thing. If users put their config before sourcing powerlevel9k, it just won't work. If they put it after, then prompt will always get rendered twice, becoming twice as slow. On the first render it'll show INSERT, and then on the second render (after refreshing everything, including vcs), it'll show NORMAL. This makes vi_mode in FWIW, Powerlevel10k has flawless |
@romkatv thx, I don't intend to rewrite the segment so I'll stick with my solution. But if anyone wants to do it, feel free. |
I am experiencing similar behavior. POWERLEVEL9K_MODE='nerdfont-complete'
ZSH_THEME="powerlevel9k/powerlevel9k"
...
plugins=(git vi-mode jenv fzf ripgrep colored-man-pages gradle rbenv conda-zsh-completion zsh-completions)
...
source $ZSH/oh-my-zsh.sh
...
POWERLEVEL9K_VI_INSERT_MODE_STRING="\ue3aa"
POWERLEVEL9K_VI_COMMAND_MODE_STRING="\u26A1"
...
# LEFT PROMPT
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(vi_mode dir vcs dir_writable)
POWERLEVEL9K_VI_MODE_INSERT_BACKGROUND="deepskyblue2"
POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND="gold3"
POWERLEVEL9K_VI_MODE_INSERT_VISUAL_IDENTIFIER_COLOR="black"
POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND="deepskyblue2"
POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND="gold3" Please provide guidance on this issue. |
vi_mode
innext
always showsINSERT
.How to reproduce:
First with
master
branch:Press
ESC
. Observe thatINSERT
on the right changes toNORMAL
. Pressi
and it goes back toINSERT
. This is expected behavior.Now replace
master
withnext
in the command and observe that the prompt always showsINSERT
.The text was updated successfully, but these errors were encountered: