summaryrefslogtreecommitdiff
path: root/Src/Zle/complist.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-20 11:03:15 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-20 11:03:15 +0000
commitb572f0295ca66596124d413f0f1266a5415d2295 (patch)
treeab6e31967f67a3d62b96c373160487c51ebb6cbd /Src/Zle/complist.c
parent3e77ff98c47b6f1c7f949f197cb68ebec734cc86 (diff)
downloadzsh-b572f0295ca66596124d413f0f1266a5415d2295.tar.gz
zsh-b572f0295ca66596124d413f0f1266a5415d2295.zip
fix off-by-one error in scrolled menu-selections (10868)
Diffstat (limited to 'Src/Zle/complist.c')
-rw-r--r--Src/Zle/complist.c21
1 files changed, 11 insertions, 10 deletions
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))