about summary refs log tree commit diff
path: root/Src/Zle/zle_main.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2014-11-17 00:41:12 +0100
committerOliver Kiddle <opk@zsh.org>2014-11-17 00:49:31 +0100
commit15fc2cd4f09a63ab9aa15f61e9724ffbd8ab8a89 (patch)
tree1041bded696d65463ef61917fb283a7526cab41a /Src/Zle/zle_main.c
parent1e934556f7a91cc15e78272763dab05ea16b6d78 (diff)
downloadzsh-15fc2cd4f09a63ab9aa15f61e9724ffbd8ab8a89.tar.gz
zsh-15fc2cd4f09a63ab9aa15f61e9724ffbd8ab8a89.tar.xz
zsh-15fc2cd4f09a63ab9aa15f61e9724ffbd8ab8a89.zip
33632: use viopp and visual local keymaps if they exist
Diffstat (limited to 'Src/Zle/zle_main.c')
-rw-r--r--Src/Zle/zle_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 8344c66be..d157e36c2 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1067,6 +1067,7 @@ getrestchar(int inchar)
 void
 zlecore(void)
 {
+    Keymap km;
 #if !defined(HAVE_POLL) && defined(HAVE_SELECT)
     struct timeval tv;
     fd_set foofd;
@@ -1088,8 +1089,10 @@ zlecore(void)
 	statusline = NULL;
 	vilinerange = 0;
 	reselectkeymap();
-	selectlocalmap(NULL);
+	selectlocalmap(invicmdmode() && region_active && (km = openkeymap("visual"))
+	    ? km : NULL);
 	bindk = getkeycmd();
+	selectlocalmap(NULL);
 	if (bindk) {
 	    if (!zlell && isfirstln && !(zlereadflags & ZLRF_IGNOREEOF) &&
 		lastchar == eofchar) {