summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Src/Zle/complist.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c4377b8a..23c5aa68f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-01-18 Barton E. Schaefer <schaefer@zsh.org>
+
+ * 32283: Src/Zle/complist.c: avoid using a negative number for
+ available vertical space when the terminal has only a small number
+ of lines; fixes crash in menu selection
+
2014-01-17 Peter Stephenson <p.w.stephenson@ntlworld.com>
* Daniel Hahler: 32271: Doc/Zsh/compsys.yo: fix matcher list
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index bcf356179..b852ee99f 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -2500,7 +2500,7 @@ domenuselect(Hookdef dummy, Chdata dat)
mlbeg--;
}
}
- if ((space = zterm_lines - pl - mhasstat))
+ if ((space = zterm_lines - pl - mhasstat) > 0)
while (mline >= mlbeg + space)
if ((mlbeg += step) + space > mlines)
mlbeg = mlines - space;