diff options
| author | Barton E. Schaefer <schaefer@zsh.org> | 2014-01-18 12:32:21 -0800 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2014-01-18 12:32:21 -0800 |
| commit | 1584318b97affe0a38f1b71233eaaa3a7076dae1 (patch) | |
| tree | f2e2fa67315ff5f621b941e41562f93e867264a9 | |
| parent | 32271: fix matcher-list example (diff) | |
| download | zsh-1584318b97affe0a38f1b71233eaaa3a7076dae1.tar zsh-1584318b97affe0a38f1b71233eaaa3a7076dae1.tar.gz zsh-1584318b97affe0a38f1b71233eaaa3a7076dae1.tar.bz2 zsh-1584318b97affe0a38f1b71233eaaa3a7076dae1.tar.lz zsh-1584318b97affe0a38f1b71233eaaa3a7076dae1.tar.xz zsh-1584318b97affe0a38f1b71233eaaa3a7076dae1.tar.zst zsh-1584318b97affe0a38f1b71233eaaa3a7076dae1.zip | |
32283: fix crash in menu selection when number of terminal lines is small
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | Src/Zle/complist.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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; |
