about summary refs log tree commit diff
path: root/Src/Zle/compresult.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/compresult.c')
-rw-r--r--Src/Zle/compresult.c5
1 files changed, 5 insertions, 0 deletions
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;