Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: make vimatchbracket more useful in emacs mode



When typing stuff in vi mode, then pressing esc%, vimatchbracket works
because the cursor jumps back a step, but in emacs mode it stays
"after" the character and nothing happens when you press ^X^B unless
you go left first, which is annoying. I don't think this will break
anything?

--- a/Src/Zle/zle_move.c
+++ b/Src/Zle/zle_move.c
@@ -536,6 +536,9 @@ vimatchbracket(UNUSED(char **args))
     int ocs = zlecs, dir, ct;
     unsigned char oth, me;

+    if ((zlecs == zlell || zleline[zlecs] == '\n') && zlecs > 0)
+	DECCS();
+
   otog:
     if (zlecs == zlell || zleline[zlecs] == '\n') {
 	zlecs = ocs;


-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author