aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-09-05 06:25:51 +0800
committerGitHub <noreply@github.com>2023-09-05 06:25:51 +0800
commit65d3378009cf2b94e4a240d2c5c3d4d19fa7fc92 (patch)
treefdd6564920ddff45154da366415e7c18b08aca56 /src
parentcf7d37ad13c74461e6a05a72123ba44676e6106c (diff)
downloadrneovim-65d3378009cf2b94e4a240d2c5c3d4d19fa7fc92.tar.gz
rneovim-65d3378009cf2b94e4a240d2c5c3d4d19fa7fc92.tar.bz2
rneovim-65d3378009cf2b94e4a240d2c5c3d4d19fa7fc92.zip
vim-patch:9.0.1866: undo is synced after character find (#25021)
vim-patch:9.0.1866: undo is synced after character find Problem: Undo is synced after character find. Solution: Set no_u_sync when calling gotchars_nop(). closes: vim/vim#13022 closes: vim/vim#13024 https://github.com/vim/vim/commit/dccc29c228f8336ef7dd069a447886639af4458e
Diffstat (limited to 'src')
-rw-r--r--src/nvim/normal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 513fb5b202..4280d62a95 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -831,7 +831,7 @@ static void normal_get_additional_char(NormalState *s)
// because if it's put back with vungetc() it's too late to apply
// mapping.
no_mapping--;
- while (lang && (s->c = vpeekc()) > 0
+ while ((s->c = vpeekc()) > 0
&& (s->c >= 0x100 || MB_BYTE2LEN(vpeekc()) > 1)) {
s->c = plain_vgetc();
if (!utf_iscomposing(s->c)) {
@@ -848,7 +848,9 @@ static void normal_get_additional_char(NormalState *s)
// but when replaying a recording the next key is already in the
// typeahead buffer, so record a <Nop> before that to prevent the
// vpeekc() above from applying wrong mappings when replaying.
+ no_u_sync++;
gotchars_nop();
+ no_u_sync--;
}
}
no_mapping--;