mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
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:
@@ -1146,10 +1146,10 @@ static void gotchars(const uint8_t *chars, size_t len)
|
||||
maptick++;
|
||||
}
|
||||
|
||||
/// Record a <Nop> key.
|
||||
void gotchars_nop(void)
|
||||
/// Record an <Ignore> key.
|
||||
void gotchars_ignore(void)
|
||||
{
|
||||
uint8_t nop_buf[3] = { K_SPECIAL, KS_EXTRA, KE_NOP };
|
||||
uint8_t nop_buf[3] = { K_SPECIAL, KS_EXTRA, KE_IGNORE };
|
||||
gotchars(nop_buf, 3);
|
||||
}
|
||||
|
||||
@@ -2746,9 +2746,9 @@ static int vgetorpeek(bool advance)
|
||||
}
|
||||
|
||||
if (timedout && c == ESC) {
|
||||
// When recording there will be no timeout. Add a <Nop> after the ESC
|
||||
// to avoid that it forms a key code with following characters.
|
||||
gotchars_nop();
|
||||
// When recording there will be no timeout. Add an <Ignore> after the
|
||||
// ESC to avoid that it forms a key code with following characters.
|
||||
gotchars_ignore();
|
||||
}
|
||||
|
||||
vgetc_busy--;
|
||||
|
Reference in New Issue
Block a user