mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.725
Problem: ":call setreg('"', [])" reports an internal error.
Solution: Make the register empty. (Yasuhiro Matsumoto)
659c94d483
Required for v8.2.1035.
Note that setreg('"', []) didn't cause an internal error for us, but
didn't clear the register properly either...
This commit is contained in:
parent
f9779facca
commit
f8241f825a
@ -5560,6 +5560,11 @@ static void str_to_reg(yankreg_T *y_ptr, MotionType yank_type, const char_u *str
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Without any lines make the register empty.
|
||||||
|
if (y_ptr->y_size + newlines == 0) {
|
||||||
|
XFREE_CLEAR(y_ptr->y_array);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Grow the register array to hold the pointers to the new lines.
|
// Grow the register array to hold the pointers to the new lines.
|
||||||
char_u **pp = xrealloc(y_ptr->y_array,
|
char_u **pp = xrealloc(y_ptr->y_array,
|
||||||
|
Loading…
Reference in New Issue
Block a user