diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-05-31 20:36:16 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-06-01 10:52:43 +0200 |
commit | 6d6974eae685feeccac027287b4dee58730a7464 (patch) | |
tree | 1c1b0efb11da11a3f6121465172410941d999a56 /src/nvim/api/vim.c | |
parent | 1d091e52f09c8167eeaa03a6e5c44070ea198c6b (diff) | |
download | rneovim-6d6974eae685feeccac027287b4dee58730a7464.tar.gz rneovim-6d6974eae685feeccac027287b4dee58730a7464.tar.bz2 rneovim-6d6974eae685feeccac027287b4dee58730a7464.zip |
refactor(input): don't use a ring for input
Since paste data is handled via a separate channel, the data processed via `input_buffer` is typically just explicit keys as typed in by the user. Therefore it should be fine to use `memmove()` to always put the remaining data in front when refilling the buffer.
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 52ab18cbff..ae8f73fa2c 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -313,7 +313,7 @@ void nvim_feedkeys(String keys, String mode, Boolean escape_ks) keys_esc = keys.data; } if (lowlevel) { - input_enqueue_raw(cstr_as_string(keys_esc)); + input_enqueue_raw(keys_esc, strlen(keys_esc)); } else { ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE), insert ? 0 : typebuf.tb_len, !typed, false); |