mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00
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 vim/vim#7140)
e9f9f16387
This commit is contained in:
@@ -4818,8 +4818,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