comparison src/normal.c @ 27418:6ecfb8d99353 v8.2.4237

patch 8.2.4237: record buffer wrong if character in Select mode was not typed Commit: https://github.com/vim/vim/commit/fbf4f1ca159028382eaeb3bfc31bb6bb96dbb67a Author: zeertzjq <zeertzjq@outlook.com> Date: Fri Jan 28 12:50:43 2022 +0000 patch 8.2.4237: record buffer wrong if character in Select mode was not typed Problem: Record buffer wrong if character in Select mode was not typed. Solution: Only delete the tail from the record buffer if the character was typed. (closes #9650)
author Bram Moolenaar <Bram@vim.org>
date Fri, 28 Jan 2022 14:00:04 +0100
parents 722db0819111
children 41e0dcf38521
comparison
equal deleted inserted replaced
27417:98239fdd09c5 27418:6ecfb8d99353
1052 // restart automatically. 1052 // restart automatically.
1053 // Insert the typed character in the typeahead buffer, so that it can 1053 // Insert the typed character in the typeahead buffer, so that it can
1054 // be mapped in Insert mode. Required for ":lmap" to work. 1054 // be mapped in Insert mode. Required for ":lmap" to work.
1055 len = ins_char_typebuf(vgetc_char, vgetc_mod_mask); 1055 len = ins_char_typebuf(vgetc_char, vgetc_mod_mask);
1056 1056
1057 // When recording the character will be recorded again, remove the 1057 // When recording and gotchars() was called the character will be
1058 // previously recording. 1058 // recorded again, remove the previous recording.
1059 ungetchars(len); 1059 if (KeyTyped)
1060 ungetchars(len);
1060 1061
1061 if (restart_edit != 0) 1062 if (restart_edit != 0)
1062 c = 'd'; 1063 c = 'd';
1063 else 1064 else
1064 c = 'c'; 1065 c = 'c';