From 9562a1ee7bd0d9cb4793f2441c7709e3da6dcefe Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Tue, 6 Apr 2021 23:36:53 +0900 Subject: 48391: fix display problem in menu-complete Take account of the trailing file type character even when '-d disp' is given to compadd. --- ChangeLog | 3 +++ Src/Zle/compresult.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 54d65ae61..4bcf659e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2021-04-06 Jun-ichi Takimoto + * 48391: Src/Zle/compresult.c: correctly calculate display string + width in completion list to fix display problem in menu-complete + * 48389: Src/math.c, Src/utils.c: getkeystring(GETKEY_SINGLE_CHAR) should not return a pointer to a local variable diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index 30fc60b78..8b5955819 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -1583,7 +1583,7 @@ calclist(int showall) nlines += 1 + printfmt(m->disp, 0, 0, 0); g->flags |= CGF_HASDL; } else { - l = ZMB_nicewidth(m->disp); + l = ZMB_nicewidth(m->disp) + !!m->modec; ndisp++; if (l > glong) glong = l; -- cgit 1.4.1