about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-01-18 12:32:21 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2014-01-18 12:32:21 -0800
commit1584318b97affe0a38f1b71233eaaa3a7076dae1 (patch)
treef2e2fa67315ff5f621b941e41562f93e867264a9 /Src/Zle
parent790664ac9007f461015d20dfa7b7122c3c737259 (diff)
downloadzsh-1584318b97affe0a38f1b71233eaaa3a7076dae1.tar.gz
zsh-1584318b97affe0a38f1b71233eaaa3a7076dae1.tar.xz
zsh-1584318b97affe0a38f1b71233eaaa3a7076dae1.zip
32283: fix crash in menu selection when number of terminal lines is small
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/complist.c2
1 files changed, 1 insertions, 1 deletions
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;