mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-09-28 15:01:21 +02:00
22651: failed to unmetafy bytes for output
This commit is contained in:
parent
1217d5a66d
commit
754503c60d
@ -1,5 +1,8 @@
|
||||
2006-08-20 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 22651: Src/Zle/complist.c, Src/Zle/zle_tricky.c: failed to
|
||||
unmetafy bytes for output.
|
||||
|
||||
* 22650: Src/Modules/zutil.c: when deleting styles, the pointer
|
||||
to the last style can become invalid.
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user