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:
Daniel Shahaf
2020-07-14 00:24:04 +00:00
parent 075c852924
commit 810c2dcede
6 changed files with 97 additions and 9 deletions

View File

@@ -67,6 +67,22 @@ expected_region_highlight=(
)
```
Memos and commas
----------------
We append to `region_highlight` as follows:
```zsh
region_highlight+=("$start $end $spec, memo=zsh-syntax-highlighting")
```
That comma is required to cause zsh 5.8 and older to ignore the memo without
ignoring the `$spec`. It's a hack, but given that no further 5.8.x patch
releases are planned, it's been deemed acceptable. See issue #418 and the
cross-referenced issues.
Miscellany
----------