mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-25 13:30:07 +00:00
treat REGION_ACTIVE=2 the same way as REGION_ACTIVE=1
This commit is contained in:
parent
ca311575d6
commit
b6ba19617c
1 changed files with 5 additions and 4 deletions
|
@ -2661,10 +2661,11 @@ _p9k_init() {
|
|||
if segment_in_use vi_mode && (( $+POWERLEVEL9K_VI_VISUAL_MODE_STRING )); then
|
||||
if is-at-least 5.3; then
|
||||
function _p9k_zle_line_pre_redraw() {
|
||||
[[ $KEYMAP == vicmd ]] &&
|
||||
[[ ${REGION_ACTIVE:-0} != $_P9K_REGION_ACTIVE ]] &&
|
||||
_P9K_REGION_ACTIVE=${REGION_ACTIVE:-0} &&
|
||||
zle && zle .reset-prompt && zle -R
|
||||
[[ $KEYMAP == vicmd ]] || return
|
||||
local region=${${REGION_ACTIVE:-0}/2/1}
|
||||
[[ $region != $_P9K_REGION_ACTIVE ]] || return
|
||||
_P9K_REGION_ACTIVE=$region
|
||||
zle && zle .reset-prompt && zle -R
|
||||
}
|
||||
autoload -Uz add-zle-hook-widget
|
||||
add-zle-hook-widget line-pre-redraw _p9k_zle_line_pre_redraw
|
||||
|
|
Loading…
Reference in a new issue