diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-07 17:39:23 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-05-07 17:39:23 +0100 |
commit | 30b6d6104c3d541c41c868989c020b743e01af08 (patch) | |
tree | 3e5f10f40c94079631816960927b6161328861cc /src/getchar.c | |
parent | 048d9d25214049dfde04c468c14bd1708fb692b8 (diff) |
patch 9.0.1521: failing redo of command with control charactersv9.0.1521
Problem: Failing redo of command with control characters.
Solution: Use AppendToRedobuffLit() for colon commands. (closes #12354)
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/getchar.c b/src/getchar.c index d510e45d91..1c3cdb19dc 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -43,8 +43,8 @@ static buffheader_T recordbuff = {{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; @@ -609,11 +609,14 @@ AppendToRedobuffLit( void AppendToRedobuffSpec(char_u *s) { + if (block_redo) + return; + while (*s != NUL) { if (*s == K_SPECIAL && s[1] != NUL && s[2] != NUL) { - // insert special key literally + // Insert special key literally. add_buff(&redobuff, s, 3L); s += 3; } |