mirror of
https://github.com/neovim/neovim.git
synced 2025-12-12 09:32:39 +00:00
fix(paste): improve repeating of pasted text (#30438)
- Fixes 'autoindent' being applied during redo. - Makes redoing a large paste significantly faster. - Stores pasted text in the register being recorded. Fix #28561
This commit is contained in:
@@ -351,6 +351,7 @@ static const struct nv_cmd {
|
||||
{ K_F1, nv_help, NV_NCW, 0 },
|
||||
{ K_XF1, nv_help, NV_NCW, 0 },
|
||||
{ K_SELECT, nv_select, 0, 0 },
|
||||
{ K_PASTE_START, nv_paste, NV_KEEPREG, 0 },
|
||||
{ K_EVENT, nv_event, NV_KEEPREG, 0 },
|
||||
{ K_COMMAND, nv_colon, 0, 0 },
|
||||
{ K_LUA, nv_colon, 0, 0 },
|
||||
@@ -6593,6 +6594,12 @@ static void nv_open(cmdarg_T *cap)
|
||||
}
|
||||
}
|
||||
|
||||
/// Handles K_PASTE_START, repeats pasted text.
|
||||
static void nv_paste(cmdarg_T *cap)
|
||||
{
|
||||
paste_repeat(cap->count1);
|
||||
}
|
||||
|
||||
/// Handle an arbitrary event in normal mode
|
||||
static void nv_event(cmdarg_T *cap)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user