diff options
author | ZyX <kp-pav@yandex.ru> | 2014-07-13 11:10:27 +0400 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2016-04-18 02:43:43 +0300 |
commit | ebabdff5cd24f2d30ab35051d1d65f7c29fa3dd3 (patch) | |
tree | 0bae55f8b469efbef6df94dd16394ea334b22a55 /src/nvim/os/input.c | |
parent | 83c683f5e15867c2e2889442860e91fd1074b4e1 (diff) | |
download | rneovim-ebabdff5cd24f2d30ab35051d1d65f7c29fa3dd3.tar.gz rneovim-ebabdff5cd24f2d30ab35051d1d65f7c29fa3dd3.tar.bz2 rneovim-ebabdff5cd24f2d30ab35051d1d65f7c29fa3dd3.zip |
keymap: Make replace_termcodes and friends accept length and cpo_flags
Reasons:
- One does not have to do `s[len] = NUL` to work with these functions if they do
not need to replace the whole string: thus `s` may be const.
- One does not have to save/restore p_cpo to work with them.
Diffstat (limited to 'src/nvim/os/input.c')
-rw-r--r-- | src/nvim/os/input.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c index f317fd6b5a..e0826aa272 100644 --- a/src/nvim/os/input.c +++ b/src/nvim/os/input.c @@ -175,8 +175,9 @@ size_t input_enqueue(String keys) char *ptr = keys.data, *end = ptr + keys.size; while (rbuffer_space(input_buffer) >= 6 && ptr < end) { - uint8_t buf[6] = {0}; - unsigned int new_size = trans_special((uint8_t **)&ptr, buf, true); + uint8_t buf[6] = { 0 }; + unsigned int new_size = trans_special((const uint8_t **)&ptr, keys.size, + buf, true); if (new_size) { new_size = handle_mouse_event(&ptr, buf, new_size); |