1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-23 17:01:05 +02:00

32283: fix crash in menu selection when number of terminal lines is small

This commit is contained in:
Barton E. Schaefer 2014-01-18 12:32:21 -08:00
parent 790664ac90
commit 1584318b97
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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;