this is a fix for the recently discussed issue of matchfuzzy at vim-dev: https://groups.google.com/forum/#!topic/vim_dev/QQrHWIwI8jM
What this does is, give sequential matches a higher priority than separator matches, so that
echo matchfuzzy(['.vim/v_i_m_r_c', '.vim/vimrc', '.vim/vimrc_colors'], 'vimrc')
will return matches in the order of ['.vim/vimrc', '.vim/vimrc_colors', '.vim/v_i_m_r_c'].
For now this PR still contains the old changes to give an extra bonus for a omplete match. But this is commented out. I just left it in, just in case if we agree that this would be a good idea in general :)
If all agree that this is not needed, I'll remove that part and push up and merge everything into one single commit.
https://github.com/vim/vim/pull/7140
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
those github actions failures are unrelated. Not sure why it fails in tests, that should run cleanly and which I haven't touched
@yegappan commented on this pull request.
In src/search.c:
> @@ -4358,6 +4364,10 @@ fuzzy_match_compute_score(
score += FIRST_LETTER_BONUS;
}
}
+ #if 0
Hi Christian,
Can you add a comment here about why this code is commented out?
Thanks,
Yegappan
@yegappan commented on this pull request.
In src/search.c:
> @@ -4358,6 +4364,10 @@ fuzzy_match_compute_score( score += FIRST_LETTER_BONUS; } } + #if 0Hi Christian,
Can you add a comment here about why this code is commented out?
I think we can just drop ENDMATCH_SEQUENTIAL_BONUS and the "fullMatch" variable. At least for now.
—
You are receiving this because you commented.
Merging #7140 into master will increase coverage by
0.02%.
The diff coverage isn/a.
@@ Coverage Diff @@ ## master #7140 +/- ## ========================================== + Coverage 88.71% 88.73% +0.02% ========================================== Files 148 148 Lines 162018 162113 +95 ========================================== + Hits 143732 143851 +119 + Misses 18286 18262 -24
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/search.c | 92.51% <ø> (ø) |
|
| src/vim9compile.c | 93.03% <0.00%> (-0.11%) |
⬇️ |
| src/list.c | 95.02% <0.00%> (ø) |
|
| src/version.c | 92.13% <0.00%> (ø) |
|
| src/terminal.c | 91.00% <0.00%> (ø) |
|
| src/evalfunc.c | 96.28% <0.00%> (+<0.01%) |
⬆️ |
| src/eval.c | 96.77% <0.00%> (+<0.01%) |
⬆️ |
| src/vim9execute.c | 93.87% <0.00%> (+<0.01%) |
⬆️ |
| src/evalvars.c | 95.74% <0.00%> (+0.01%) |
⬆️ |
| src/userfunc.c | 93.52% <0.00%> (+0.01%) |
⬆️ |
| ... and 12 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update 8d739de...ffbdce2. Read the comment docs.
—
You are receiving this because you commented.
@yegappan approved this pull request.
—
You are receiving this because you commented.