1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-01 18:30:55 +01:00

21821, 21822: fix two infinite loops

This commit is contained in:
Bart Schaefer 2005-10-04 14:27:12 +00:00
parent c1b01cfba2
commit 7f3c92059f
2 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2005-10-04 Bart Schaefer <schaefer@zsh.org>
* 21822 (annotated): Src/Zle/complist.c: prevent a long-standing
infinite loop when redrawing the listing during menu-selection
with a very narrow window.
* 21821: Src/Zle/complist.c: fix infinite loop when multibyte
support is disabled, introduced by 21784.
2005-10-03 Peter Stephenson <pws@csr.com>
* 21809: Src/utils.c: need to export nicedup() for

View file

@ -672,7 +672,7 @@ clnicezputs(Listcols colors, char *s, int ml)
if (colors)
initiscol(colors);
while ((cc = *s)) {
while ((cc = *s++)) {
if (colors)
doiscol(colors, i++);
if (itok(cc)) {
@ -2153,9 +2153,15 @@ domenuselect(Hookdef dummy, Chdata dat)
if (y < mlines)
mline = y;
}
DPUTS(mline < 0,
"BUG: mline < 0 after re-scanning mtab in domenuselect()");
while (mline < mlbeg)
if ((mlbeg -= step) < 0)
if ((mlbeg -= step) < 0) {
mlbeg = 0;
/* Crude workaround for BUG above */
if (mline < 0)
break;
}
if (mlbeg && lbeg != mlbeg) {
Cmatch **p = mtab + ((mlbeg - 1) * columns), **q;