summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/complist.c21
2 files changed, 14 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 3796a43c8..d1279b339 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2000-04-20 Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
+ * 10868: Src/Zle/complist.c: fix off-by-one error in scrolled
+ menu-selections
+
* 10861: Completion/Bsd/.distfiles, Completion/Bsd/_bsd_pkg,
Completion/Bsd/_cvsup, Completion/Bsd/_kld: new completions for
FreeBSD commands
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))