[vim/vim] runtime(helptoc): FuzzySearch() highlights matched characters at the wrong column for multibyte text (PR #21198)

4 views
Skip to first unread message

VimWei

unread,
Aug 31, 2026, 8:05:59 AM (5 days ago) Aug 31
to vim/vim, Subscribed

Problem: matchfuzzypos() returns match positions as character indices, but
text property col/length are counted in bytes. FuzzySearch()
used "col + 1" and "length: 1", so matched multibyte characters
were split and only their first byte was highlighted.

Solution: Convert character indices to byte offsets with byteidx() and use
the byte length of each matched character.

fixes: #21056


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/21198

Commit Summary

  • 7ece831 runtime(helptoc): FuzzySearch() highlights matched characters at the wrong column for multibyte text

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21198@github.com>

Christian Brabandt

unread,
Sep 1, 2026, 3:10:43 PM (4 days ago) Sep 1
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#21198)

thanks


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/21198/c5499034025@github.com>

Reply all
Reply to author
Forward
0 new messages