diff --git a/zsh/themes/adlee.zsh-theme b/zsh/themes/adlee.zsh-theme index 656e8e2..7490659 100644 --- a/zsh/themes/adlee.zsh-theme +++ b/zsh/themes/adlee.zsh-theme @@ -125,9 +125,9 @@ autoload -Uz add-zsh-hook add-zsh-hook preexec adlee_preexec add-zsh-hook precmd adlee_precmd -# Configure ZLE -zle -N zle-line-init -zle -N zle-keymap-select +# Configure ZLE (only register widgets if the functions exist, e.g. from vi-mode plugin) +(( ${+functions[zle-line-init]} )) && zle -N zle-line-init +(( ${+functions[zle-keymap-select]} )) && zle -N zle-keymap-select # Initial prompt build (critical for tmux) _adlee_build_prompt