vim-patch:9.1.0060: Recorded register cannot be translated using keytrans() (#27247)

Problem:  Recorded register cannot be translated using keytrans() when
          it involves character search (iddqd505)
Solution: Record a K_IGNORE instead of a K_NOP (zeertzjq)

related: vim/vim#13916
closes: vim/vim#13925

bf321806bf
This commit is contained in:
zeertzjq
2024-01-29 07:27:15 +08:00
committed by GitHub
parent 56ae85a33c
commit ba7a52dedc
3 changed files with 11 additions and 9 deletions

View File

@@ -845,10 +845,10 @@ static void normal_get_additional_char(NormalState *s)
no_mapping++;
// Vim may be in a different mode when the user types the next key,
// 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.
// typeahead buffer, so record an <Ignore> before that to prevent
// the vpeekc() above from applying wrong mappings when replaying.
no_u_sync++;
gotchars_nop();
gotchars_ignore();
no_u_sync--;
}
}