*-highlight: Don't recurse if the string is from PREBUFFER

Issue #108
This commit is contained in:
Sebastian Gniazdowski 2019-07-13 06:12:21 +02:00
parent a4452c7504
commit ef78ab1799

View file

@ -867,7 +867,8 @@ typeset -ga ZLAST_COMMANDS
else
__idx=0
fi
-fast-highlight-process "$PREBUFFER" ${${__arg%[\'\"]}#[\'\"]} $(( _start_pos + 1 ))
(( _start_pos-__PBUFLEN >= 0 )) && \
-fast-highlight-process "$PREBUFFER" ${${__arg%[\'\"]}#[\'\"]} $(( _start_pos + 1 ))
(( __idx )) && FAST_THEME_NAME=$_mybuf
already_added=1
else
@ -945,7 +946,8 @@ typeset -ga ZLAST_COMMANDS
else
__idx=0
fi
-fast-highlight-process "$PREBUFFER" ${${__arg%[\`]}#[\`]} $(( _start_pos + 1 ))
(( _start_pos-__PBUFLEN >= 0 )) && \
-fast-highlight-process "$PREBUFFER" "${${__arg%[\`]}#[\`]}" $(( _start_pos + 1 ))
(( __idx )) && FAST_THEME_NAME=$_mybuf
already_added=1
;;