aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2024-08-31 17:10:05 +0800
committerGitHub <noreply@github.com>2024-08-31 17:10:05 +0800
commita6c4487e8bfc8dc527ed64651515963e46ebeee8 (patch)
tree75e68901a8c3555f7a043a3a08fee1c0babe9824 /src
parent53af02adbad049f5fc24540cc0f38fa4f9aadf58 (diff)
downloadrneovim-a6c4487e8bfc8dc527ed64651515963e46ebeee8.tar.gz
rneovim-a6c4487e8bfc8dc527ed64651515963e46ebeee8.tar.bz2
rneovim-a6c4487e8bfc8dc527ed64651515963e46ebeee8.zip
vim-patch:9.1.0684: completion is inserted on Enter with "noselect" (#30111)
Problem: completion is inserted on Enter with "noselect" (Carman Fu) Solution: check noselect before update compl_shown_match (glepnir) fixes: vim/vim#15526 closes: vim/vim#15530 https://github.com/vim/vim/commit/753794bae8a9401903b82e5c5d1f35a106aa912a
Diffstat (limited to 'src')
-rw-r--r--src/nvim/insexpand.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c
index 1522aeeb75..c17bd27daa 100644
--- a/src/nvim/insexpand.c
+++ b/src/nvim/insexpand.c
@@ -1244,7 +1244,9 @@ static int ins_compl_build_pum(void)
if (comp->cp_score > max_fuzzy_score) {
did_find_shown_match = true;
max_fuzzy_score = comp->cp_score;
- compl_shown_match = comp;
+ if (!compl_no_select) {
+ compl_shown_match = comp;
+ }
}
if (!shown_match_ok && comp == compl_shown_match && !compl_no_select) {