diff --git a/tests/test-highlighting.zsh b/tests/test-highlighting.zsh index f335293..91534ef 100755 --- a/tests/test-highlighting.zsh +++ b/tests/test-highlighting.zsh @@ -206,7 +206,7 @@ run_test() { local ret=$pipestatus[1] stderr=$pipestatus[2] if (( ! stderr )); then # stdout will become stderr - echo "Bail out! On ${(qq)1}: output on stderr"; return 1 + echo "Bail out! On ${(qq)1}: output on stderr"; return 1 else return $ret fi diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index 5c6b478..fd2a7c6 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -161,12 +161,12 @@ _zsh_highlight() (( REGION_ACTIVE )) || return integer min max if (( MARK > CURSOR )) ; then - min=$CURSOR max=$MARK + min=$CURSOR max=$MARK else - min=$MARK max=$CURSOR + min=$MARK max=$CURSOR fi if (( REGION_ACTIVE == 1 )); then - [[ $KEYMAP = vicmd ]] && (( max++ )) + [[ $KEYMAP = vicmd ]] && (( max++ )) elif (( REGION_ACTIVE == 2 )); then local needle=$'\n' # CURSOR and MARK are 0 indexed between letters like region_highlight