about summary refs log tree commit diff
path: root/Src/Zle/zle_refresh.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-07-19 14:26:14 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-07-19 14:26:14 +0000
commitd6d4a3abfc84f0940e663cd69537789a039a7056 (patch)
tree5f5f40ae248c17c34fccbcadef85dddd4136b781 /Src/Zle/zle_refresh.c
parent1f6786ef7ae24ff858f52c6d4ac2bc23d529c0c1 (diff)
downloadzsh-d6d4a3abfc84f0940e663cd69537789a039a7056.tar.gz
zsh-d6d4a3abfc84f0940e663cd69537789a039a7056.tar.xz
zsh-d6d4a3abfc84f0940e663cd69537789a039a7056.zip
zsh-3.1.6-test-2 zsh-3.1.6-test-2
Diffstat (limited to 'Src/Zle/zle_refresh.c')
-rw-r--r--Src/Zle/zle_refresh.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index 48e1071b8..1dbffc21c 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -53,7 +53,8 @@ int nlnct;
 /**/
 int showinglist;
 
-/* Non-zero if a completion list was displayed. */
+/* > 0 if a completion list is displayed below the prompt,
+ * < 0 if a list is displayed above the prompt. */
 
 /**/
 int listshown;
@@ -265,7 +266,7 @@ zrefresh(void)
     if (inlist)
 	return;
 
-    if (clearlist && listshown) {
+    if (clearlist && listshown > 0) {
 	if (tccan(TCCLEAREOD)) {
 	    int ovln = vln, ovcs = vcs;
 	    char *nb = nbuf[vln];
@@ -331,7 +332,8 @@ zrefresh(void)
                 tcout(TCCLEAREOD);
             else
                 cleareol = 1;   /* request: clear to end of line */
-	    listshown = 0;
+	    if (listshown > 0)
+		listshown = 0;
 	}
         if (t0 > -1)
             olnct = t0;