From 8026bedc1c883ccb8237def0b12642644724d0af Mon Sep 17 00:00:00 2001 From: Geoff Wing Date: Fri, 5 Mar 2004 00:51:36 +0000 Subject: 19474: fix a calculation when displaying completions which are screen width or multiples of that wide, and ALWAYS_LAST_PROMPT --- ChangeLog | 6 ++++++ Src/Zle/compresult.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index da7b1a9d7..9678520a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-03-05 Geoff Wing + + * 19474: Src/Zle/compresult.c: fix a calculation when displaying + completions which are screen width or multiples of that wide, and + option always_last_prompt is used. + 2004-03-04 Peter Stephenson * 19535: configure.ac, INSTALL: Add --enable-cap flag diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index bc6cc36b2..c4c265c70 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -1573,10 +1573,10 @@ calclist(int showall) if (!(m->flags & CMF_HIDE)) { if (m->disp) { if (!(m->flags & CMF_DISPLINE)) - glines += 1 + (mlens[m->gnum] / columns); + glines += 1 + ((mlens[m->gnum] - 1) / columns); } else if (showall || !(m->flags & (CMF_NOLIST | CMF_MULT))) - glines += 1 + ((mlens[m->gnum]) / columns); + glines += 1 + (((mlens[m->gnum]) - 1) / columns); } } } -- cgit 1.4.1