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

PATCH: don't start a vi change from emacs mode



If put-replace-change is used from emacs mode, it starts a vi change.
This is mostly harmless, or at least was before this was used by the
terminal cursor changing to tell vi mode apart from emacs mode. This
patch makes this conditional.

vi-backward-delete-char also has a similar condition. Most widgets in
zle_vi.c don't but I can't see much else that would warrant it.

Oliver

diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c
index 3e50d5d4b..b17270b51 100644
--- a/Src/Zle/zle_misc.c
+++ b/Src/Zle/zle_misc.c
@@ -685,7 +685,8 @@ putreplaceselection(UNUSED(char **args))
     int clear = 0;
     int pos = 2;
 
-    startvichange(-1);
+    if (invicmdmode())
+	startvichange(-1);
     if (n < 0 || zmod.flags & MOD_NULL)
 	return 1;
     if (zmod.flags & MOD_OSSEL) {




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