about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-06-13 14:03:44 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-06-13 14:03:44 +0000
commita5a5aa4e3e43d3e83a5aa8770f9170ea6ace6e32 (patch)
treef4d2595c7e9d0336bd7e2ef5a137767327251e5c
parent6bb50488ab28461e52784590bf0e7744aa5bc120 (diff)
downloadzsh-a5a5aa4e3e43d3e83a5aa8770f9170ea6ace6e32.tar.gz
zsh-a5a5aa4e3e43d3e83a5aa8770f9170ea6ace6e32.tar.xz
zsh-a5a5aa4e3e43d3e83a5aa8770f9170ea6ace6e32.zip
fixes for display bugs for completion lists (cursor left one line to far up or down) (14903)
-rw-r--r--ChangeLog6
-rw-r--r--Src/Zle/complist.c11
-rw-r--r--Src/Zle/zle_tricky.c4
3 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 7d346f8c6..882719631 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-06-13  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 14903: Src/Zle/complist.c, Src/Zle/zle_tricky.c: fixes for
+	display bugs for completion lists (cursor left one line to far
+	up or down)
+
 2001-06-13  Peter Stephenson  <pws@csr.com>
 
 	* 14893: Src/signals.c: make handler mod_export because it's
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 4975a39ae..f76e54116 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -887,7 +887,7 @@ compprintfmt(char *fmt, int n, int dopr, int doesc, int ml, int *stop)
 	    if (*p == '\n') {
 		if (dopr == 1 && mlbeg >= 0 && tccan(TCCLEAREOL))
 		    tcout(TCCLEAREOL);
-		l += 1 + (cc / columns);
+		l += 1 + ((cc - 1) / columns);
 		cc = 0;
 	    }
 	    if (dopr == 1) {
@@ -909,9 +909,12 @@ compprintfmt(char *fmt, int n, int dopr, int doesc, int ml, int *stop)
 	    }
 	}
     }
-    if (dopr && mlbeg >= 0 && tccan(TCCLEAREOL))
-	tcout(TCCLEAREOL);
-
+    if (dopr) {
+        if (!(cc % columns))
+            fputs(" \010", shout);
+        if (mlbeg >= 0 && tccan(TCCLEAREOL))
+            tcout(TCCLEAREOL);
+    }
     if (stat && n)
 	mfirstl = -1;
 
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index f2e6524ee..5886b4114 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1949,7 +1949,7 @@ printfmt(char *fmt, int n, int dopr, int doesc)
 			    putc(' ', shout);
 		    }
 		}
-		l += 1 + (cc / columns);
+		l += 1 + ((cc - 1) / columns);
 		cc = 0;
 	    }
 	    if (dopr) {
@@ -1960,6 +1960,8 @@ printfmt(char *fmt, int n, int dopr, int doesc)
 	}
     }
     if (dopr) {
+        if (!(cc % columns))
+            fputs(" \010", shout);
 	if (tccan(TCCLEAREOL))
 	    tcout(TCCLEAREOL);
 	else {