summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-04-15 07:03:34 +0800
committerGitHub <noreply@github.com>2026-04-14 23:03:34 +0000
commit65680f59d153c3ec08297d3a9fe7bc72ebf48464 (patch)
treeb35cc73e98e0f7eab122bfe6e6e183f90a3be2ba /src
parente827c3b6481b84e503ab0a4325ada4b6631a602f (diff)
vim-patch:9.2.0345: Wrong autoformatting with 'autocomplete' (#39060)
Problem: Wrong autoformatting with 'autocomplete'. Solution: Don't trigger autoformatting when ending autocompletion without selecting an item (zeertzjq). fixes: vim/vim#19954 closes: vim/vim#19970 https://github.com/vim/vim/commit/efbd482116d0f1a244b436a46ce3544b016de04b
Diffstat (limited to 'src')
-rw-r--r--src/nvim/insexpand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c
index 2057c73e9d..11794fd747 100644
--- a/src/nvim/insexpand.c
+++ b/src/nvim/insexpand.c
@@ -2629,7 +2629,7 @@ static bool ins_compl_stop(const int c, const int prev_mode, bool retval)
do_c_expr_indent();
want_cindent = false; // don't do it again
}
- } else {
+ } else if (!compl_autocomplete || compl_used_match) {
const int prev_col = curwin->w_cursor.col;
// put the cursor on the last char, for 'tw' formatting