about summary refs log tree commit diff
path: root/Src/Zle
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 /Src/Zle
parent5bed7d645b21e01ec89ddb8799c9a8b46385f13f (diff)
downloadzsh-c99a94e365d43983121f1e9ae6c345eaf13ab55a.tar.gz
zsh-c99a94e365d43983121f1e9ae6c345eaf13ab55a.tar.xz
zsh-c99a94e365d43983121f1e9ae6c345eaf13ab55a.zip
better cursor-movement in menu-selection (11569)
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/complist.c14
1 files changed, 11 insertions, 3 deletions
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) ||