Highlight the region on top of syntax highlighting.
Let $zle_highlight[region] override $region_highlight.
This commit is contained in:
parent
555e142e66
commit
0e31d6e1a2
@ -92,6 +92,22 @@ _zsh_highlight()
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Re-apply zle_highlight settings
|
||||||
|
() {
|
||||||
|
if (( REGION_ACTIVE )) ; then
|
||||||
|
# zle_highlight[region] defaults to 'standout' if unspecified
|
||||||
|
local region="${${zle_highlight[(r)region:*]#region:}:-standout}"
|
||||||
|
integer start end
|
||||||
|
if (( MARK > CURSOR )) ; then
|
||||||
|
start=$CURSOR end=$MARK
|
||||||
|
else
|
||||||
|
start=$MARK end=$CURSOR
|
||||||
|
fi
|
||||||
|
region_highlight+=("$start $end $region")
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} always {
|
} always {
|
||||||
_ZSH_HIGHLIGHT_PRIOR_BUFFER=$BUFFER
|
_ZSH_HIGHLIGHT_PRIOR_BUFFER=$BUFFER
|
||||||
_ZSH_HIGHLIGHT_PRIOR_CURSOR=$CURSOR
|
_ZSH_HIGHLIGHT_PRIOR_CURSOR=$CURSOR
|
||||||
|
Loading…
Reference in New Issue
Block a user