From 0e7c726c326ec255e00ce43818c793d974bc2268 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Tue, 14 Mar 2000 09:43:42 +0000 Subject: zsh-workers/10127 --- Src/Zle/compresult.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Src/Zle/compresult.c') diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index d49c7b811..1d3ee6d27 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -1528,6 +1528,7 @@ mod_export int asklist(void) showinglist = listshown = 0; clearflag = (isset(USEZLE) && !termflags && dolastprompt); + lastlistlen = 0; /* Maybe we have to ask if the user wants to see the list. */ if ((!minfo.cur || !minfo.asked) && @@ -1756,16 +1757,20 @@ printlist(int over, CLPrintFunc printm, int showall) pnl = 1; g = g->next; } + lastlistlen = 0; if (clearflag) { /* Move the cursor up to the prompt, if always_last_prompt * * is set and all that... */ if ((ml = listdat.nlines + nlnct - 1) < lines) { tcmultout(TCUP, TCMULTUP, ml); showinglist = -1; + + lastlistlen = listdat.nlines; } else clearflag = 0, putc('\n', shout); } else putc('\n', shout); + listshown = (clearflag ? 1 : -1); return printed; -- cgit 1.4.1