From 962624e8c343e3968fbb55160b8a14b460400bc0 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 19 Jun 2011 16:26:10 +0000 Subject: 29491: remove some variables set but not used --- Src/Zle/zle_refresh.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'Src/Zle/zle_refresh.c') diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index 797f86251..52797831c 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -2418,8 +2418,6 @@ singlerefresh(ZLE_STRING_T tmpline, int tmpll, int tmpcs) all_atr_off = TXT_ATTR_OFF_FROM_ON(all_atr_on); if (tmpline[t0] == ZWC('\t')) { - REFRESH_ELEMENT sp = zr_sp; - sp.atr = base_atr_on; for (*vp++ = zr_sp; (vp - vbuf) & 7; ) *vp++ = zr_sp; vp[-1].atr |= base_atr_off; -- cgit v1.2.3 From cd3acd762de380d84c0e1f213f4b9bcc36206d55 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Wed, 17 Aug 2011 10:15:49 +0000 Subject: 29681: use [] to dereference region_highlights --- ChangeLog | 7 ++++++- Src/Zle/zle_refresh.c | 14 +++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'Src/Zle/zle_refresh.c') diff --git a/ChangeLog b/ChangeLog index 208b3f6a1..3427e05f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-08-17 Mikael Magnusson + + * 29681: Src/Zle/zle_refresh.c: consistently use [] to access + region_highlights. + 2011-08-16 Wayne Davison * 29650: Src/jobs.c: don't lose the the time info after a @@ -15270,5 +15275,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5431 $ +* $Revision: 1.5432 $ ***************************************************** diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index 52797831c..260df8bf6 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -341,7 +341,7 @@ zle_set_highlight(void) match_highlight(*atrs + 8, &special_atr_on); special_atr_on_set = 1; } else if (strpfx("region:", *atrs)) { - match_highlight(*atrs + 7, ®ion_highlights->atr); + match_highlight(*atrs + 7, ®ion_highlights[0].atr); region_atr_on_set = 1; } else if (strpfx("isearch:", *atrs)) { match_highlight(*atrs + 8, &(region_highlights[1].atr)); @@ -357,7 +357,7 @@ zle_set_highlight(void) if (!special_atr_on_set) special_atr_on = TXTSTANDOUT; if (!region_atr_on_set) - region_highlights->atr = TXTSTANDOUT; + region_highlights[0].atr = TXTSTANDOUT; if (!isearch_atr_on_set) region_highlights[1].atr = TXTUNDERLINE; if (!suffix_atr_on_set) @@ -1022,14 +1022,14 @@ zrefresh(void) /* check for region between point ($CURSOR) and mark ($MARK) */ if (region_active) { if (zlecs <= mark) { - region_highlights->start = zlecs; - region_highlights->end = mark; + region_highlights[0].start = zlecs; + region_highlights[0].end = mark; } else { - region_highlights->start = mark; - region_highlights->end = zlecs; + region_highlights[0].start = mark; + region_highlights[0].end = zlecs; } } else { - region_highlights->start = region_highlights->end = -1; + region_highlights[0].start = region_highlights[0].end = -1; } /* check for isearch string to highlight */ if (isearch_active) { -- cgit v1.2.3