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

@@ -380,6 +380,10 @@ enum key_extra {
#define K_KENTER TERMCAP2KEY('K', 'A') // keypad Enter
#define K_KPOINT TERMCAP2KEY('K', 'B') // keypad . or ,
// Delimits pasted text (to repeat nvim_paste). Internal-only, not sent by UIs.
#define K_PASTE_START TERMCAP2KEY('P', 'S') // paste start
#define K_PASTE_END TERMCAP2KEY('P', 'E') // paste end
#define K_K0 TERMCAP2KEY('K', 'C') // keypad 0
#define K_K1 TERMCAP2KEY('K', 'D') // keypad 1
#define K_K2 TERMCAP2KEY('K', 'E') // keypad 2