summary refs log tree commit diff
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2005-11-01 04:02:02 +0000
committerWayne Davison <wayned@users.sourceforge.net>2005-11-01 04:02:02 +0000
commitf53996f14b0dc2a5733440d92f614aa36d07e9fd (patch)
tree6802f1c4bae0470a3aeef031a19e57164bf16041
parent5c02c474d1c0166ccf5d78c49bf33258d70cbbe6 (diff)
downloadzsh-f53996f14b0dc2a5733440d92f614aa36d07e9fd.tar.gz
zsh-f53996f14b0dc2a5733440d92f614aa36d07e9fd.tar.xz
zsh-f53996f14b0dc2a5733440d92f614aa36d07e9fd.zip
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.
-rw-r--r--Src/Zle/zle_refresh.c6
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)