summaryrefslogtreecommitdiff
path: root/Src/Zle/compresult.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-09-29 17:32:34 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-09-29 17:32:34 +0000
commit046f4cf49e1a082f78b0acadadae8855db5cb37e (patch)
tree1c4191795ecab9f349cadb17f9c60102ec1809e6 /Src/Zle/compresult.c
parent6183db6faa0815f09267062769c602a1de3d9e81 (diff)
downloadzsh-046f4cf49e1a082f78b0acadadae8855db5cb37e.tar.gz
zsh-046f4cf49e1a082f78b0acadadae8855db5cb37e.zip
21784: Improved character widths for formatted multibyte character output
Diffstat (limited to 'Src/Zle/compresult.c')
-rw-r--r--Src/Zle/compresult.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index d80a60ac1..ad8c8ea62 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -1509,7 +1509,7 @@ calclist(int showall)
nlines += 1 + printfmt(m->disp, 0, 0, 0);
g->flags |= CGF_HASDL;
} else {
- l = niceztrlen(m->disp);
+ l = ZMB_nicewidth(m->disp);
ndisp++;
if (l > glong)
glong = l;
@@ -1524,7 +1524,7 @@ calclist(int showall)
if (!(m->flags & CMF_ROWS))
g->flags &= ~CGF_ROWS;
} else {
- l = niceztrlen(m->str) + !!m->modec;
+ l = ZMB_nicewidth(m->str) + !!m->modec;
ndisp++;
if (l > glong)
glong = l;
@@ -2146,11 +2146,19 @@ iprintm(Cmgroup g, Cmatch *mp, UNUSED(int mc), UNUSED(int ml), int lastc, int wi
printfmt(m->disp, 0, 1, 0);
return;
}
+#ifdef ZLE_UNICODE_SUPPORT
+ len = mb_niceformat(m->disp, shout, NULL);
+#else
nicezputs(m->disp, shout);
len = niceztrlen(m->disp);
+#endif
} else {
+#ifdef ZLE_UNICODE_SUPPORT
+ len = mb_niceformat(m->str, shout, NULL);
+#else
nicezputs(m->str, shout);
len = niceztrlen(m->str);
+#endif
if ((g->flags & CGF_FILES) && m->modec) {
putc(m->modec, shout);