From 12298be0fe66df54a9a485fef21e7bcdf4d07f0f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 17 Apr 2025 07:44:12 +0800 Subject: [PATCH] vim-patch:9.1.1310: completion: redundant check for preinsert effect (#33505) Problem: Duplicate check for preinsert effect, particularly for Ctrl_w and Ctrl_U. Solution: Remove the specific check for Ctrl_w and Ctrl_U to eliminate redundancy (glepnir). closes: vim/vim#17129 https://github.com/vim/vim/commit/1c2b25825037bf83862f7af71ce9177cf949daca Co-authored-by: glepnir (cherry picked from commit f9f6dc4262ea8c31856dac82abe8057e6e07ba11) --- src/nvim/insexpand.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index 1b245e23be..caf0cce681 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -2261,10 +2261,6 @@ static bool ins_compl_stop(const int c, const int prev_mode, bool retval) retval = true; } - if ((c == Ctrl_W || c == Ctrl_U) && ins_compl_preinsert_effect()) { - ins_compl_delete(false); - } - auto_format(false, true); // Trigger the CompleteDonePre event to give scripts a chance to