mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
vim-patch:8.2.4002: first char typed in Select mode can be wrong
Problem: First char typed in Select mode can be wrong.
Solution: Escape special bytes in the input buffer. (closes vim/vim#9469)
6cac77016b
The `buf` should already be large enough, but I'll change its size
anyway in case future patches change the meaning of `MB_MAXBYTES` macro.
`fix_input_buffer()` cannot be used here because of the `using_script()`
check, and there is already equivalent code in its place.
This commit is contained in:
@@ -984,7 +984,7 @@ int ins_typebuf(char_u *str, int noremap, int offset, bool nottyped, bool silent
|
||||
/// @return the length of what was inserted
|
||||
int ins_char_typebuf(int c, int modifier)
|
||||
{
|
||||
char_u buf[MB_MAXBYTES + 4];
|
||||
char_u buf[MB_MAXBYTES * 3 + 4];
|
||||
int len = 0;
|
||||
if (modifier != 0) {
|
||||
buf[0] = K_SPECIAL;
|
||||
|
Reference in New Issue
Block a user