From f53996f14b0dc2a5733440d92f614aa36d07e9fd Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 1 Nov 2005 04:02:02 +0000 Subject: I just noticed that zsh's default icntrl() macro returns true for chars 128 - 159, so the "... ? ZWC('?') : (CHAR_VALUE | ZWC('@'))" code needed to be updated to reflect this. --- Src/Zle/zle_refresh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Src/Zle/zle_refresh.c') diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index 7d866f5b1..1342c2d64 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -661,7 +661,7 @@ zrefresh(void) if (nextline(&rpms, 1)) break; } - *rpms.s++ = ((unsigned int)*t > 31) ? ZWC('?') : (*t | ZWC('@')); + *rpms.s++ = (((unsigned int)*t & ~0x80u) > 31) ? ZWC('?') : (*t | ZWC('@')); } else { /* normal character */ *rpms.s++ = *t; } @@ -718,7 +718,7 @@ zrefresh(void) nbuf[rpms.ln][winw + 1] = ZWC('\n');/* text wrapped */ snextline(&rpms); } - *rpms.s++ = ((unsigned int)*u > 31) ? ZWC('?') : (*u | ZWC('@')); + *rpms.s++ = (((unsigned int)*u & ~0x80u) > 31) ? ZWC('?') : (*u | ZWC('@')); } else *rpms.s++ = *u; if (rpms.s == rpms.sen) { @@ -1537,7 +1537,7 @@ singlerefresh(ZLE_STRING_T tmpline, int tmpll, int tmpcs) ZLE_INT_T t = tmpline[++t0]; *vp++ = ZWC('^'); - *vp++ = ((unsigned int)t > 31) ? ZWC('?') : (t | ZWC('@')); + *vp++ = (((unsigned int)t & ~0x80u) > 31) ? ZWC('?') : (t | ZWC('@')); } else *vp++ = tmpline[t0]; if (t0 == tmpcs) -- cgit 1.4.1