summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/complist.c16
-rw-r--r--Src/Zle/zle_tricky.c20
2 files changed, 29 insertions, 7 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 421901b78..886b4a685 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -621,7 +621,11 @@ clprintfmt(Listcols c, char *p, int ml)
 	if (ml == mlend - 1 && (cc % columns) == columns - 1)
 	    return 0;
 
-	putc(*p, shout);
+	if (*p == Meta) {
+	    p++;
+	    putc(*p ^ 32, shout);
+	} else
+	    putc(*p, shout);
 	if ((beg = !(cc % columns)))
 	    ml++;
 	if (mscroll && !(cc % columns) &&
@@ -1137,8 +1141,14 @@ compprintfmt(char *fmt, int n, int dopr, int doesc, int ml, int *stop)
 		    dopr = 0;
 		    continue;
 		}
-		while (len--)
-		    putc(*p++, shout);
+		while (len--) {
+		    if (*p == Meta) {
+			len--;
+			p++;
+			putc(*p++ ^ 32, shout);
+		    } else
+			putc(*p++, shout);
+		}
 		if ((beg = !(cc % columns)) && !stat) {
 		    ml++;
                     fputs(" \010", shout);
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index b25dea6e7..0983bec31 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -2123,9 +2123,15 @@ printfmt(char *fmt, int n, int dopr, int doesc)
 			tcout(TCUNDERLINEEND);
 		    break;
 		case '{':
-		    for (p++; *p && (*p != '%' || p[1] != '}'); p++)
-			if (dopr)
+		    for (p++; *p && (*p != '%' || p[1] != '}'); p++) {
+			if (*p == Meta) {
+			    p++;
+			    if (dopr) 
+				putc(*p ^ 32, shout);
+			}
+			else if (dopr)
 			    putc(*p, shout);
+		    }
 		    if (*p)
 			p++;
 		    else
@@ -2164,8 +2170,14 @@ printfmt(char *fmt, int n, int dopr, int doesc)
 		convchar_t cchar;
 		int clen = MB_METACHARLENCONV(p, &cchar);
 		if (dopr) {
-		    while (clen--)
-			putc(*p++, shout);
+		    while (clen--) {
+			if (*p == Meta) {
+			    p++;
+			    clen--;
+			    putc(*p++ ^ 32, shout);
+			} else
+			    putc(*p++, shout);
+		    }
 		} else
 		    p += clen;
 		cc += WCWIDTH(cchar);