diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-04-05 18:04:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-05 18:04:45 +0800 |
commit | a500c5f808ccf0b678c935f00e0af4503a5bd724 (patch) | |
tree | faec5c534b49cccfabb239748499d530ea5bc054 /src/nvim/api/vim.c | |
parent | 4add77ddbfbbff0795ee9bcca42b8096a6265049 (diff) | |
download | rneovim-a500c5f808ccf0b678c935f00e0af4503a5bd724.tar.gz rneovim-a500c5f808ccf0b678c935f00e0af4503a5bd724.tar.bz2 rneovim-a500c5f808ccf0b678c935f00e0af4503a5bd724.zip |
vim-patch:8.1.0815: dialog for file changed outside of Vim not tested (#28184)
Problem: Dialog for file changed outside of Vim not tested.
Solution: Add a test. Move FileChangedShell test. Add 'L' flag to
feedkeys().
https://github.com/vim/vim/commit/5e66b42aae7c67a3ef67617d4bd43052ac2b73ce
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 2fb8f3d554..82e9ddff2d 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -277,6 +277,7 @@ void nvim_feedkeys(String keys, String mode, Boolean escape_ks) bool typed = false; bool execute = false; bool dangerous = false; + bool lowlevel = false; for (size_t i = 0; i < mode.size; i++) { switch (mode.data[i]) { @@ -292,6 +293,8 @@ void nvim_feedkeys(String keys, String mode, Boolean escape_ks) execute = true; break; case '!': dangerous = true; break; + case 'L': + lowlevel = true; break; } } @@ -307,10 +310,14 @@ void nvim_feedkeys(String keys, String mode, Boolean escape_ks) } else { keys_esc = keys.data; } - ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE), - insert ? 0 : typebuf.tb_len, !typed, false); - if (vgetc_busy) { - typebuf_was_filled = true; + if (lowlevel) { + input_enqueue_raw(cstr_as_string(keys_esc)); + } else { + ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE), + insert ? 0 : typebuf.tb_len, !typed, false); + if (vgetc_busy) { + typebuf_was_filled = true; + } } if (escape_ks) { |