Do not highlight in isearch widgets
As long as zle_highlight for the isearch region can't be applied properly *after* zsh-syntax-highlighting is done it does not make sense to apply any highlighting while isearch is active. Otherwise its almost impossible to see the matched area.
This commit is contained in:
parent
38c3ac8831
commit
89ee223124
@ -66,6 +66,12 @@ _zsh_highlight()
|
||||
setopt localoptions noksharrays
|
||||
local REPLY # don't leak $REPLY into global scope
|
||||
|
||||
# Do not highlight in isearch widgets.
|
||||
if [[ $WIDGET == zle-isearch-update ]]; then
|
||||
region_highlight=()
|
||||
return $ret
|
||||
fi
|
||||
|
||||
# Do not highlight if there are more than 300 chars in the buffer. It's most
|
||||
# likely a pasted command or a huge list of files in that case..
|
||||
[[ -n ${ZSH_HIGHLIGHT_MAXLENGTH:-} ]] && [[ $#BUFFER -gt $ZSH_HIGHLIGHT_MAXLENGTH ]] && return $ret
|
||||
|
Loading…
Reference in New Issue
Block a user