mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
Use the new, unreleased zsh 'memo=' feature to remove only our own entries from $region_highlight.
Fixes #418 (interoperability issue with other plugins).
This commit is contained in:
parent
075c852924
commit
810c2dcede
6 changed files with 97 additions and 9 deletions
|
|
@ -55,7 +55,7 @@ _zsh_highlight_regexp_highlighter_loop()
|
|||
local -a match mbegin mend
|
||||
while true; do
|
||||
[[ "$buf" =~ "$pat" ]] || return;
|
||||
region_highlight+=("$((MBEGIN - 1 + OFFSET)) $((MEND + OFFSET)) $ZSH_HIGHLIGHT_REGEXP[$pat]")
|
||||
region_highlight+=("$((MBEGIN - 1 + OFFSET)) $((MEND + OFFSET)) $ZSH_HIGHLIGHT_REGEXP[$pat], memo=zsh-syntax-highlighting")
|
||||
buf="$buf[$(($MEND+1)),-1]"
|
||||
OFFSET=$((MEND+OFFSET));
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue