Mercurial > vim
diff src/eval.c @ 8945:a3060addc328 v7.4.1758
commit https://github.com/vim/vim/commit/245c41070c7f37d52be43cce0cb140bd3ade6c7e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Apr 20 17:37:41 2016 +0200
patch 7.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).
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 20 Apr 2016 17:45:06 +0200 |
parents | 36cb3aff8c1c |
children | 9b04f9e8d1d4 |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -11547,6 +11547,7 @@ f_feedkeys(typval_T *argvars, typval_T * 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 * 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 * /* 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; } }