about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-25 11:33:13 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-25 11:33:13 +0000
commitc99a94e365d43983121f1e9ae6c345eaf13ab55a (patch)
tree1121429030adda7ed50874f45269fa40d246b964
parent5bed7d645b21e01ec89ddb8799c9a8b46385f13f (diff)
downloadzsh-c99a94e365d43983121f1e9ae6c345eaf13ab55a.tar.gz
zsh-c99a94e365d43983121f1e9ae6c345eaf13ab55a.tar.xz
zsh-c99a94e365d43983121f1e9ae6c345eaf13ab55a.zip
better cursor-movement in menu-selection (11569)
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/complist.c14
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0dfe07a36..176f0dadc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-25  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 11569: Src/Zle/complist.c: better cursor-movement in
+ 	menu-selection
+	
 2000-05-25  Peter Stephenson  <pws@cambridgesiliconradio.com>
 
 	* 11567: Src/Modules/zftp.c: fix fcntl() argument for FD_CLOEXEC.
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index b6aa78bd7..bbf2b8d4a 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -1949,8 +1949,12 @@ domenuselect(Hookdef dummy, Chdata dat)
 		    continue;
 	    } while (!*p || *p == mtexpl);
 
-	    if (wrap == 1)
-		goto left;
+	    if (wrap == 1) {
+		if (mcol == wishcol)
+		    goto left;
+
+		wishcol = mcol;
+	    }
 	} else if (cmd == Th(z_emacsforwardword) ||
 		   cmd == Th(z_viforwardword) ||
 		   cmd == Th(z_viforwardwordend) ||
@@ -2104,8 +2108,12 @@ domenuselect(Hookdef dummy, Chdata dat)
 	    } while (!*p || *p == mtexpl || (mcol != omcol && *p == *op));
 	    wishcol = mcol;
 
-	    if (wrap == 2)
+	    if (wrap == 2) {
+		p += mcols - 1 - mcol;
+		wishcol = mcol = mcols - 1;
+		adjust_mcol(wishcol, &p, NULL);
 		goto up;
+	    }
 	} else if (cmd == Th(z_beginningofbufferorhistory) ||
 		   cmd == Th(z_beginningofline) ||
 		   cmd == Th(z_beginningoflinehist) ||