diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-02-27 08:52:38 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2025-02-27 08:55:43 +0800 |
| commit | f56d2b3c596218e503cad8f9bdb028bf780577a1 (patch) | |
| tree | 4d720e4aea081ee04ce6d7b0ccba1dbac8239d47 /src/nvim/ops.c | |
| parent | e1a3128ec4312f537479bbe4dcd789599ac054fc (diff) | |
| download | rneovim-f56d2b3c596218e503cad8f9bdb028bf780577a1.tar.gz rneovim-f56d2b3c596218e503cad8f9bdb028bf780577a1.tar.bz2 rneovim-f56d2b3c596218e503cad8f9bdb028bf780577a1.zip | |
vim-patch:9.1.1152: Patch v9.1.1151 causes problems
Problem: Patch v9.1.1151 causes problems
Solution: partially revert it (John Marriott)
closes: vim/vim#16736
https://github.com/vim/vim/commit/18bacc811c30ba26405cadbeb79d9013d9885bb5
Co-authored-by: John Marriott <basilisk@internode.on.net>
Diffstat (limited to 'src/nvim/ops.c')
| -rw-r--r-- | src/nvim/ops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index f60a6d50c9..72c75534d4 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -1039,7 +1039,7 @@ int do_record(int c) // restore the current register name. yankreg_T *old_y_previous = y_previous; - retval = stuff_yank(regname, p, get_recorded_len()); + retval = stuff_yank(regname, p); y_previous = old_y_previous; } @@ -1051,7 +1051,7 @@ int do_record(int c) /// uppercase). "p" must have been allocated. /// /// @return FAIL for failure, OK otherwise -static int stuff_yank(int regname, char *p, size_t plen) +static int stuff_yank(int regname, char *p) { // check for read-only register if (regname != 0 && !valid_yank_reg(regname, true)) { @@ -1063,6 +1063,7 @@ static int stuff_yank(int regname, char *p, size_t plen) return OK; } + const size_t plen = strlen(p); yankreg_T *reg = get_yank_register(regname, YREG_YANK); if (is_append_register(regname) && reg->y_array != NULL) { String *pp = &(reg->y_array[reg->y_size - 1]); |