aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-09-22 06:02:48 +0800
committerGitHub <noreply@github.com>2024-09-22 06:02:48 +0800
commite697c1b43dfbeab132fee4149157f7abd08c51a0 (patch)
tree4fb363d573f9606f7314799e03c6ba9e0f5fd0e1 /src/nvim/edit.c
parent1d815acd78e5b961302985b80d2b625947902386 (diff)
downloadrneovim-e697c1b43dfbeab132fee4149157f7abd08c51a0.tar.gz
rneovim-e697c1b43dfbeab132fee4149157f7abd08c51a0.tar.bz2
rneovim-e697c1b43dfbeab132fee4149157f7abd08c51a0.zip
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
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 13623eaa91..f06dc124f0 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -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.