From dd6e702ee49c7292c39037843b1b1b2b080f9fda Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 25 Jun 2020 11:41:21 +0000 Subject: 46068 (tweaked) (was: github #57): region_highlight: Add memo= support. This is useful when multiple plugins add region_highlight entries and subsequently want to remove only their own entries. Without this functionality, recognizing one's region_highlight entries is not trivial because the 'start' and 'end' offsets are modified by editing of $BUFFER and the highlight specification may not be unique or distinctive. The tweaks are as follows: - Change zfree() to zsfree() per workers/46070. - Remove the mem.c hunk, as it changed the signature of only one out of two alternative definitions of zsfree(). (The definition that hunk touched is the one that's not used by default.) --- README | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'README') diff --git a/README b/README index 8ae615153..9b1b1605f 100644 --- a/README +++ b/README @@ -83,6 +83,15 @@ affects you, make the implied colons in the first pattern explicit, as in: zstyle ':foo:*:baz:*' style value2 This will use value1 in both 5.8 and 5.9. +Elements of the region_highlight array have gained a fourth space-separated +field. Code written against 5.9 that sets the new field may break under 5.8: +for example, the element "0 20 bold memo=foo", which is valid under 5.9, would +not work under 5.8. (Under the hood, 5.8 does not recognize the space as +terminating the highlighting specification.) On the other hand, code that does +not set the new, fourth field will continue to work under both 5.8 and 5.9. +(As it happens, adding a comma after "bold" will make both 5.8 and 5.9 do the +right thing, but this should be viewed as an unsupported hack.) + Incompatibilities between 5.7.1 and 5.8 --------------------------------------- -- cgit 1.4.1