diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2011-02-18 22:08:45 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2011-02-18 22:08:45 +0000 |
commit | 212ca9edf9c2be0499cdce39326abba57b088bcd (patch) | |
tree | b14bcc7e91fb33213b349914c477d9c22cd8a25d /Src/Zle/compresult.c | |
parent | 6be3fe2fca7d904ce4c83303a1b23e36ed45a084 (diff) | |
download | zsh-212ca9edf9c2be0499cdce39326abba57b088bcd.tar.gz zsh-212ca9edf9c2be0499cdce39326abba57b088bcd.tar.xz zsh-212ca9edf9c2be0499cdce39326abba57b088bcd.zip |
28772: Update regions in region highlight dynamically
Diffstat (limited to 'Src/Zle/compresult.c')
-rw-r--r-- | Src/Zle/compresult.c | 9 |
1 files changed, 7 insertions, 2 deletions
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; |