diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-08 00:41:18 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-05-08 01:12:09 +0800 |
commit | 5844af0d524956b55100e4350934237e4a12a147 (patch) | |
tree | 5d9f239d6421d94f2327df672500332ec72b099f /src/nvim/getchar.c | |
parent | 32331378134599ece34298f866889b4b311d7b79 (diff) | |
download | rneovim-5844af0d524956b55100e4350934237e4a12a147.tar.gz rneovim-5844af0d524956b55100e4350934237e4a12a147.tar.bz2 rneovim-5844af0d524956b55100e4350934237e4a12a147.zip |
vim-patch:9.0.1521: failing redo of command with control characters
Problem: Failing redo of command with control characters.
Solution: Use AppendToRedobuffLit() for colon commands. (closes vim/vim#12354)
https://github.com/vim/vim/commit/30b6d6104c3d541c41c868989c020b743e01af08
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index c070e53089..ca555937ab 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -92,8 +92,8 @@ static buffheader_T readbuf2 = { { NULL, { NUL } }, NULL, 0, 0 }; static int typeahead_char = 0; // typeahead char that's not flushed -// when block_redo is true redo buffer will not be changed -// used by edit() to repeat insertions and 'V' command for redoing +/// When block_redo is true the redo buffer will not be changed. +/// Used by edit() to repeat insertions. static int block_redo = false; static int KeyNoremap = 0; // remapping flags @@ -558,6 +558,10 @@ void AppendToRedobuffLit(const char *str, int len) /// and escaping other K_SPECIAL bytes. void AppendToRedobuffSpec(const char *s) { + if (block_redo) { + return; + } + while (*s != NUL) { if ((uint8_t)(*s) == K_SPECIAL && s[1] != NUL && s[2] != NUL) { // Insert special key literally. |