From 212ca9edf9c2be0499cdce39326abba57b088bcd Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 18 Feb 2011 22:08:45 +0000 Subject: 28772: Update regions in region highlight dynamically --- Src/Zle/compresult.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Src/Zle/compresult.c') diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index bdfcfd739..0389b52a2 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -698,8 +698,10 @@ hasbrpsfx(Cmatch m, char *pre, char *suf) { char *op = lastprebr, *os = lastpostbr; VARARR(char, oline, zlemetall); - int oll = zlemetall, ocs = zlemetacs, ole = lastend, opcs = brpcs, oscs = brscs, ret; + int oll = zlemetall, newll, ole = lastend; + int opcs = brpcs, oscs = brscs, ret; + zle_save_positions(); memcpy(oline, zlemetaline, zlemetall); lastprebr = lastpostbr = NULL; @@ -710,7 +712,10 @@ hasbrpsfx(Cmatch m, char *pre, char *suf) foredel(zlemetall, CUT_RAW); spaceinline(oll); memcpy(zlemetaline, oline, oll); - zlemetacs = ocs; + /* we do not want to restore zlemetall */ + newll = zlemetall; + zle_restore_positions(); + zlemetall = newll; lastend = ole; brpcs = opcs; brscs = oscs; -- cgit 1.4.1