=== modified file 'zsh-functions/ft_vi_promptinit' --- zsh-functions/ft_vi_promptinit 2015-10-23 10:00:53 +0000 +++ zsh-functions/ft_vi_promptinit 2013-06-04 18:35:49 +0000 @@ -67,18 +67,6 @@ typeset -ga zle_finish_functions typeset -ga zle_keymap_functions -zle_init_add() { - (($+zle_init_functions[(k)$1])) || zle_init_functions+=( $1 ) -} - -zle_finish_add() { - (($+zle_finish_functions[(k)$1])) || zle_finish_functions+=( $1 ) -} - -zle_keymap_add() { - (($+zle_keymap_functions[(k)$1])) || zle_keymap_functions+=( $1 ) -} - # This is an associative array, that tracks the current zle # state. This may contain the following key-value pairs: # minibuffer - values: yes/no; yes if a minibuffer is active. @@ -138,16 +126,16 @@ } # If a keymap change is done, we do need a status update, obviously. -zle_keymap_add ft-psvx +zle_keymap_functions=( "${zle_keymap_functions[@]}" ft-psvx ) # When a command line finishes, the next keyboard mode needs to be set # up, so that `psvar[x]' is correct when the next prompt is drawn. -zle_finish_add ft-psvx-default +zle_finish_functions=( "${zle_finish_functions[@]}" ft-psvx-default ) if [[ ${zle_default_mode} == 'cmd' ]]; then # We cannot simply link `vicmd' to `main'. If we'd do that the # whole input system could not be set into insert mode. See the # zshzle(1) manual for details. To make vicmd the default mode # for new command lines, we simply turn it on in `zle-line-init()'. - zle_init_add ft-vi-cmd + zle_init_functions=( "${zle_init_functions[@]}" ft-vi-cmd ) fi function zle-line-init() {