forked from aniani/vim
patch 8.2.1872: matchfuzzy() does not prefer sequential matches
Problem: Matchfuzzy() does not prefer sequential matches. Solution: Give sequential matches a higher bonus. (Christian Brabandt, closes #7140)
This commit is contained in:
@@ -4252,8 +4252,9 @@ typedef struct
|
||||
list_T *lmatchpos;
|
||||
} fuzzyItem_T;
|
||||
|
||||
// bonus for adjacent matches
|
||||
#define SEQUENTIAL_BONUS 15
|
||||
// bonus for adjacent matches; this is higher than SEPARATOR_BONUS so that
|
||||
// matching a whole word is preferred.
|
||||
#define SEQUENTIAL_BONUS 40
|
||||
// bonus if match occurs after a separator
|
||||
#define SEPARATOR_BONUS 30
|
||||
// bonus if match is uppercase and prev is lower
|
||||
|
Reference in New Issue
Block a user