patch 9.1.1315: completion: issue with fuzzy completion and 'completefuzzycollect'
Problem: chain complete does not work when 'cot' includes fuzzy
and 'completefuzzycollect' collects wrong next word.
(Konfekt)
Solution: compl_startpos is not set correctly, remove next word check
in search_for_fuzzy_match (glepnir).
fixes #17131
fixes #16942
closes: #17136
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/insexpand.c b/src/insexpand.c
index 8673e74..2335862 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -6101,7 +6101,6 @@
if (line_invalid)
line = ml_get(curwin->w_cursor.lnum);
- int in_fuzzy = get_cot_flags() & COT_FUZZY;
if (compl_status_adding())
{
edit_submode_pre = (char_u *)_(" Adding");
@@ -6119,7 +6118,7 @@
compl_col = curwin->w_cursor.col;
compl_lnum = curwin->w_cursor.lnum;
}
- else if (ctrl_x_mode_normal() && in_fuzzy)
+ else if (ctrl_x_mode_normal() && cfc_has_mode())
{
compl_startpos = curwin->w_cursor;
compl_cont_status &= CONT_S_IPOS;