summaryrefslogtreecommitdiff
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-24 21:58:10 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-24 21:58:10 +0100
commit5e66b42aae7c67a3ef67617d4bd43052ac2b73ce (patch)
treee00649ad921bc12da2203892d56a3703f9b8bd8f /src/evalfunc.c
parented18f2c03ae4786b489943cb575bb781a70356e4 (diff)
downloadvim-git-5e66b42aae7c67a3ef67617d4bd43052ac2b73ce.tar.gz
patch 8.1.0815: dialog for file changed outside of Vim not testedv8.1.0815
Problem: Dialog for file changed outside of Vim not tested. Solution: Add a test. Move FileChangedShell test. Add 'L' flag to feedkeys().
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 5bba7eaf0..269423f92 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -3674,6 +3674,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
int typed = FALSE;
int execute = FALSE;
int dangerous = FALSE;
+ int lowlevel = FALSE;
char_u *keys_esc;
/* This is not allowed in the sandbox. If the commands would still be
@@ -3697,6 +3698,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
case 'i': insert = TRUE; break;
case 'x': execute = TRUE; break;
case '!': dangerous = TRUE; break;
+ case 'L': lowlevel = TRUE; break;
}
}
}
@@ -3708,7 +3710,16 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
keys_esc = vim_strsave_escape_csi(keys);
if (keys_esc != NULL)
{
- ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
+ if (lowlevel)
+ {
+#ifdef USE_INPUT_BUF
+ add_to_input_buf(keys, (int)STRLEN(keys));
+#else
+ emsg(_("E980: lowlevel input not supported"));
+#endif
+ }
+ else
+ ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
insert ? 0 : typebuf.tb_len, !typed, FALSE);
vim_free(keys_esc);
if (vgetc_busy