driver: Do not highlight newlines or past BUFFER for zle standout
This commit is contained in:
parent
84f0507cf6
commit
ff85c7e01b
|
@ -168,8 +168,10 @@ _zsh_highlight()
|
||||||
else
|
else
|
||||||
min=$MARK max=$CURSOR
|
min=$MARK max=$CURSOR
|
||||||
fi
|
fi
|
||||||
(( min = ${${BUFFER[1,$min]}[(I)$needle]} ))
|
# CURSOR and MARK are 0 indexed between letters like region_highlight
|
||||||
(( max += ${${BUFFER:($max-1)}[(i)$needle]} - 1 ))
|
# Do not include the newline in the highlight
|
||||||
|
(( min = ${BUFFER[(Ib:min:)$needle]} ))
|
||||||
|
(( max = ${BUFFER[(ib:max:)$needle]} - 1 ))
|
||||||
_zsh_highlight_apply_zle_highlight region standout "$min" "$max"
|
_zsh_highlight_apply_zle_highlight region standout "$min" "$max"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user