diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2021-03-16 14:46:40 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2021-03-16 14:46:40 -0600 |
commit | 0a67be1024b1e54b6af59f01b01ceace9fdf7bb2 (patch) | |
tree | 2e989a1c283cc942312222d1afecd28640c5315b /plugins/vi-mode | |
parent | 0f2bface6494ae546ea83cbf45b65a18dbc0c4fb (diff) | |
parent | 95a06f3927a286db257dc99791b02caba757fe33 (diff) | |
download | zsh-0a67be1024b1e54b6af59f01b01ceace9fdf7bb2.tar.gz zsh-0a67be1024b1e54b6af59f01b01ceace9fdf7bb2.tar.bz2 zsh-0a67be1024b1e54b6af59f01b01ceace9fdf7bb2.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/vi-mode')
-rw-r--r-- | plugins/vi-mode/vi-mode.plugin.zsh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index 7f14961ad..dd4afdd8b 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -50,13 +50,17 @@ zle -N zle-keymap-select # These "echoti" statements were originally set in lib/key-bindings.zsh # Not sure the best way to extend without overriding. function zle-line-init() { + local prev_vi_keymap + prev_vi_keymap="${VI_KEYMAP:-}" typeset -g VI_KEYMAP=main + [[ "$prev_vi_keymap" != 'main' ]] && [[ "${VI_MODE_RESET_PROMPT_ON_MODE_CHANGE:-}" = true ]] && zle reset-prompt (( ! ${+terminfo[smkx]} )) || echoti smkx _vi-mode-set-cursor-shape-for-keymap "${VI_KEYMAP}" } zle -N zle-line-init function zle-line-finish() { + typeset -g VI_KEYMAP=main (( ! ${+terminfo[rmkx]} )) || echoti rmkx _vi-mode-set-cursor-shape-for-keymap default } |