diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-20 11:03:15 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-20 11:03:15 +0000 |
commit | b572f0295ca66596124d413f0f1266a5415d2295 (patch) | |
tree | ab6e31967f67a3d62b96c373160487c51ebb6cbd | |
parent | 3e77ff98c47b6f1c7f949f197cb68ebec734cc86 (diff) | |
download | zsh-b572f0295ca66596124d413f0f1266a5415d2295.tar.gz zsh-b572f0295ca66596124d413f0f1266a5415d2295.tar.xz zsh-b572f0295ca66596124d413f0f1266a5415d2295.zip |
fix off-by-one error in scrolled menu-selections (10868)
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/Zle/complist.c | 21 |
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)) |