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:
zeertzjq
2024-09-22 06:02:48 +08:00
committed by GitHub
parent 1d815acd78
commit e697c1b43d
8 changed files with 233 additions and 32 deletions

View File

@@ -907,6 +907,10 @@ static int insert_handle_key(InsertState *s)
case K_IGNORE: // Something mapped to nothing
break;
case K_PASTE_START:
paste_repeat(1);
goto check_pum;
case K_EVENT: // some event
state_handle_k_event();
// If CTRL-G U was used apply it to the next typed key.