From 6959ffd9621fdb8f33b53e1c0be05f3f294742a5 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Thu, 25 May 2000 07:58:44 +0000 Subject: force listing in _complete_debug; make complist with list-scrolling stopt at the end of the list when prompt would scroll it out; fix _in_vared to handle `foo[bar]' (11565) --- Src/Zle/complist.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'Src/Zle/complist.c') diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index e1538e35b..b6aa78bd7 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -1302,36 +1302,41 @@ compprintlist(int showall) if (nlnct <= 1) mscroll = 0; if (clearflag) { + int nl; + /* Move the cursor up to the prompt, if always_last_prompt * * is set and all that... */ if (mlbeg >= 0) { - if ((ml = listdat.nlines + nlnct) >= lines) { + if ((nl = listdat.nlines + nlnct) >= lines) { if (mhasstat) { putc('\n', shout); compprintfmt(NULL, 0, 1, 1, mline, NULL); } - ml = lines - 1; + nl = lines - 1; } else - ml--; - tcmultout(TCUP, TCMULTUP, ml); + nl--; + tcmultout(TCUP, TCMULTUP, nl); showinglist = -1; lastlistlen = listdat.nlines; - } else if ((ml = listdat.nlines + nlnct - 1) < lines) { + } else if ((nl = listdat.nlines + nlnct - 1) < lines) { if (mlbeg >= 0 && tccan(TCCLEAREOL)) tcout(TCCLEAREOL); - tcmultout(TCUP, TCMULTUP, ml); + tcmultout(TCUP, TCMULTUP, nl); showinglist = -1; lastlistlen = listdat.nlines; } else { clearflag = 0; - if (!asked) + if (!asked) { + mrestlines = (ml + nlnct > lines); compprintnl(ml); + } } - } else if (!asked) + } else if (!asked) { + mrestlines = (ml + nlnct > lines); compprintnl(ml); - + } listshown = (clearflag ? 1 : -1); mnew = 0; -- cgit 1.4.1