0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-19 04:01:21 +02:00

fix(vi-mode): fix cursor change on visual mode (#11586)

Fixes #11586
This commit is contained in:
Marc Cornellà 2023-04-02 13:40:49 +02:00
parent 68005b8870
commit f7d903f3a3
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B

View file

@ -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