diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-06-20 11:13:10 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-06-20 11:13:10 +0300 |
commit | b6ba19617c967b276f801c2163a1359303eceb3e (patch) | |
tree | 488783ab814c91206bef8874e607208a9e7f76be /internal/p10k.zsh | |
parent | ca311575d6a967b938703cb68eaa8354def0f421 (diff) |
treat REGION_ACTIVE=2 the same way as REGION_ACTIVE=1
Diffstat (limited to 'internal/p10k.zsh')
-rwxr-xr-x | internal/p10k.zsh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 5dbe4d87..986df9ac 100755 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -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 |