]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1445: negative matchfuzzy scores although there is a match v9.1.1445
authorGirish Palya <girishji@gmail.com>
Mon, 9 Jun 2025 18:43:03 +0000 (20:43 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 9 Jun 2025 18:43:03 +0000 (20:43 +0200)
commit328332b0b03ff6a709ed319b83429390ee8394d8
tree43f20bd4b0698c4e5bfc3b96f87c798bb37fb968
parentde1c7ac432aeade45eaf08527bffc4aedb44a169
patch 9.1.1445: negative matchfuzzy scores although there is a match

Problem:  negative matchfuzzy scores although there is a match
          (Maxim Kim)
Solution: reset the score if a match has been found but the score is
          negative (Girish Palya)

The fuzzy algorithm may miss some matches in long strings due to recursion
limits. As a result, the score can end up negative even when matches exist.
In such cases, reset the score to ensure it is non-negative.

fixes: ##17449
closes: #17469

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/search.c
src/testdir/test_matchfuzzy.vim
src/version.c