diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_refresh.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) |