summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-04-20 17:37:41 +0200
committerBram Moolenaar <Bram@vim.org>2016-04-20 17:37:41 +0200
commit245c41070c7f37d52be43cce0cb140bd3ade6c7e (patch)
treef666ae9cc35f8c7745aa0e33e885de3fcf20083c /src/eval.c
parent8e42ae5069d4985869e46eaa56900ed19e30f504 (diff)
downloadvim-git-245c41070c7f37d52be43cce0cb140bd3ade6c7e.tar.gz
patch 7.4.1758v7.4.1758
Problem: Triggering CursorHoldI when in CTRL-X mode causes problems. Solution: Do not trigger CursorHoldI in CTRL-X mode. Add "!" flag to feedkeys() (test with that didn't work though).
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index 28cc2f1a7..53a651a4d 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -11547,6 +11547,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
char_u nbuf[NUMBUFLEN];
int typed = FALSE;
int execute = FALSE;
+ int dangerous = FALSE;
char_u *keys_esc;
/* This is not allowed in the sandbox. If the commands would still be
@@ -11569,6 +11570,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
case 't': typed = TRUE; break;
case 'i': insert = TRUE; break;
case 'x': execute = TRUE; break;
+ case '!': dangerous = TRUE; break;
}
}
}
@@ -11592,9 +11594,11 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
/* Avoid a 1 second delay when the keys start Insert mode. */
msg_scroll = FALSE;
- ++ex_normal_busy;
+ if (!dangerous)
+ ++ex_normal_busy;
exec_normal(TRUE);
- --ex_normal_busy;
+ if (!dangerous)
+ --ex_normal_busy;
msg_scroll |= save_msg_scroll;
}
}