@ -91,28 +91,32 @@ function bindkey-all {
# Exposes information about the Zsh Line Editor via the $editor_info associative
# Exposes information about the Zsh Line Editor via the $editor_info associative
# array.
# array.
function editor-info {
function editor-info {
# Clean up previous $editor_info.
# Ensure that we're going to set the editor-info for prompts that
unset editor_info
# are prezto managed and/or compatible.
typeset -gA editor_info
if zstyle -t ':prezto:module:prompt' managed; then
# Clean up previous $editor_info.
if [ [ " $KEYMAP " = = 'vicmd' ] ] ; then
unset editor_info
zstyle -s ':prezto:module:editor:info:keymap:alternate' format 'REPLY'
typeset -gA editor_info
editor_info[ keymap] = " $REPLY "
else
if [ [ " $KEYMAP " = = 'vicmd' ] ] ; then
zstyle -s ':prezto:module:editor:info:keymap:primary' format 'REPLY'
zstyle -s ':prezto:module:editor:info:keymap:alternate' format 'REPLY'
editor_info[ keymap] = " $REPLY "
editor_info[ keymap] = " $REPLY "
if [ [ " $ZLE_STATE " = = *overwrite* ] ] ; then
zstyle -s ':prezto:module:editor:info:keymap:primary:overwrite' format 'REPLY'
editor_info[ overwrite] = " $REPLY "
else
else
zstyle -s ':prezto:module:editor:info:keymap:primary:insert' format 'REPLY'
zstyle -s ':prezto:module:editor:info:keymap:primary' format 'REPLY'
editor_info[ overwrite] = " $REPLY "
editor_info[ keymap] = " $REPLY "
if [ [ " $ZLE_STATE " = = *overwrite* ] ] ; then
zstyle -s ':prezto:module:editor:info:keymap:primary:overwrite' format 'REPLY'
editor_info[ overwrite] = " $REPLY "
else
zstyle -s ':prezto:module:editor:info:keymap:primary:insert' format 'REPLY'
editor_info[ overwrite] = " $REPLY "
fi
fi
fi
fi
unset REPLY
unset REPLY
zle zle-reset-prompt
zle zle-reset-prompt
fi
}
}
zle -N editor-info
zle -N editor-info