From b572f0295ca66596124d413f0f1266a5415d2295 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Thu, 20 Apr 2000 11:03:15 +0000 Subject: fix off-by-one error in scrolled menu-selections (10868) --- Src/Zle/complist.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'Src') diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index 0529077d3..48c216cf8 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -1122,21 +1122,12 @@ compprintlist(int showall) n = lastn; nl = lastnl; lastused = 1; + pnl = 0; } else p = g->matches; for (; (m = *p); p++) { if (m->disp && (m->flags & CMF_DISPLINE)) { - if (!lasttype && ml >= mlbeg) { - lasttype = 2; - lastg = g; - lastbeg = mlbeg; - lastml = ml; - lastp = p; - lastn = n; - lastnl = nl; - lastused = 1; - } if (pnl) { if (dolistnl(ml) && compprintnl(ml)) goto end; @@ -1148,6 +1139,16 @@ compprintlist(int showall) tcout(TCCLEAREOD); } } + if (!lasttype && ml >= mlbeg) { + lasttype = 2; + lastg = g; + lastbeg = mlbeg; + lastml = ml; + lastp = p; + lastn = n; + lastnl = nl; + lastused = 1; + } if (mfirstl < 0) mfirstl = ml; if (dolist(ml)) -- cgit 1.4.1