User's definition of highlighting from "zle_highlight" array should take precedence over custom highlighters. This is especially important for *region context* (see CHARACTER HIGHLIGHTING chapter in man zshzle for *region context* definition), as this is overwritten by region_highlight array, leading to highlighting only parts of selected region properly.

This commit forces to use type of highlighting as defined in region context of zle_highlight array.
This commit is contained in:
jimmijj 2015-09-04 00:41:02 +02:00
parent 162655841c
commit ece762e817

View File

@ -90,6 +90,8 @@ _zsh_highlight()
# Use value form cache if any cached # Use value form cache if any cached
eval "region_highlight+=(\"\${${cache_place}[@]}\")" eval "region_highlight+=(\"\${${cache_place}[@]}\")"
# Bring back region higlighting from zle_highlight array (was overwriten by region_highlight)
((REGION_ACTIVE)) && region_highlight+=("$((CURSOR < MARK ? CURSOR : MARK)) $((CURSOR > MARK ? CURSOR : MARK)) ${${(M)zle_highlight[@]:#region*}#region:}")
done done
} always { } always {