diff options
author | Marc Cornellà <hello@mcornella.com> | 2023-04-02 13:40:49 +0200 |
---|---|---|
committer | Marc Cornellà <hello@mcornella.com> | 2023-04-02 13:40:49 +0200 |
commit | f7d903f3a31567f326d0f8ec2414722d0e3b992a (patch) | |
tree | 1f5c8d7734c7e7f13a07db2e2156fff5ce38c977 | |
parent | 68005b887055ddd1c6d3fd1381b6eb7b786a0a38 (diff) | |
download | zsh-f7d903f3a31567f326d0f8ec2414722d0e3b992a.tar.gz zsh-f7d903f3a31567f326d0f8ec2414722d0e3b992a.tar.bz2 zsh-f7d903f3a31567f326d0f8ec2414722d0e3b992a.zip |
fix(vi-mode): fix cursor change on visual mode (#11586)
Fixes #11586
-rw-r--r-- | plugins/vi-mode/vi-mode.plugin.zsh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index d44be69d4..cc9817a74 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -43,6 +43,13 @@ function _vi-mode-set-cursor-shape-for-keymap() { printf $'\e[%d q' "${_shape}" } +function _visual-mode { + typeset -g VI_KEYMAP=visual + _vi-mode-set-cursor-shape-for-keymap "$VI_KEYMAP" + zle .visual-mode +} +zle -N visual-mode _visual-mode + function _vi-mode-should-reset-prompt() { # If $VI_MODE_RESET_PROMPT_ON_MODE_CHANGE is unset (default), dynamically # check whether we're using the prompt to display vi-mode info |