diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-25 07:58:44 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-25 07:58:44 +0000 |
commit | 6959ffd9621fdb8f33b53e1c0be05f3f294742a5 (patch) | |
tree | 8f3e7cf83e0787961d4369074ece179d828464ec /Src | |
parent | 9121d78354d0578333e4f64ac6fa96710e0bf118 (diff) | |
download | zsh-6959ffd9621fdb8f33b53e1c0be05f3f294742a5.tar.gz zsh-6959ffd9621fdb8f33b53e1c0be05f3f294742a5.tar.xz zsh-6959ffd9621fdb8f33b53e1c0be05f3f294742a5.zip |
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)
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/complist.c | 23 |
1 files changed, 14 insertions, 9 deletions
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; |