patch 8.2.4917: fuzzy expansion of option names is not right
Problem: Fuzzy expansion of option names is not right.
Solution: Pass the fuzzy flag down the call chain. (Christian Brabandt,
closes #10380, closes #10318)
diff --git a/src/option.c b/src/option.c
index 92b1b93..33bb641 100644
--- a/src/option.c
+++ b/src/option.c
@@ -6511,7 +6511,8 @@
regmatch_T *regmatch,
char_u *fuzzystr,
int *numMatches,
- char_u ***matches)
+ char_u ***matches,
+ int can_fuzzy)
{
int num_normal = 0; // Nr of matching non-term-code settings
int num_term = 0; // Nr of matching terminal code settings
@@ -6527,7 +6528,7 @@
int fuzzy;
fuzmatch_str_T *fuzmatch = NULL;
- fuzzy = cmdline_fuzzy_complete(fuzzystr);
+ fuzzy = can_fuzzy && cmdline_fuzzy_complete(fuzzystr);
// do this loop twice:
// loop == 0: count the number of matching options