about summary refs log tree commit diff
path: root/Src/Zle/compresult.c
diff options
context:
space:
mode:
authorGeoff Wing <gcw@users.sourceforge.net>2004-03-05 00:51:36 +0000
committerGeoff Wing <gcw@users.sourceforge.net>2004-03-05 00:51:36 +0000
commit8026bedc1c883ccb8237def0b12642644724d0af (patch)
treee1374169750323f2dc1d2fdd1bf2375b87ff4452 /Src/Zle/compresult.c
parent8cba4981ad2b5f234b25238db489c86dd3c4a570 (diff)
downloadzsh-8026bedc1c883ccb8237def0b12642644724d0af.tar.gz
zsh-8026bedc1c883ccb8237def0b12642644724d0af.tar.xz
zsh-8026bedc1c883ccb8237def0b12642644724d0af.zip
19474: fix a calculation when displaying completions which are
screen width or multiples of that wide, and ALWAYS_LAST_PROMPT
Diffstat (limited to 'Src/Zle/compresult.c')
-rw-r--r--Src/Zle/compresult.c4
1 files changed, 2 insertions, 2 deletions
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);
 			}
 		}
 	    }