[vim/vim] Move target greedy match after $() to avoid region matching overflow (PR #18938)

2 views
Skip to first unread message

littlewu2508

unread,
Dec 15, 2025, 11:46:00 PM (20 hours ago) Dec 15
to vim/vim, Subscribed

Partially revert 2a33b49, where all syn match makeIdent are moved before syn region makeIdent to match $() (reason: see #18403 (comment))

However this results in #18890 , because lines like
$(a) =
will first start a region search beginning with $( but then the whole target including ) will be matched by syn match makeIdent "^ *[^:#= \t]*\s*="me=e-1
which leaves the region search for the never-found ) and let the region matching overflow.

Same for

$(a) ::
$(a) +=

The solution is to move those greedy target match back, so they take priority and prevents region match from happening.

Closes: #18890


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

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

Commit Summary

  • 2ebd6fa Move target greedy match after $() to avoid region matching overflow

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18938@github.com>

littlewu2508

unread,
Dec 15, 2025, 11:46:32 PM (20 hours ago) Dec 15
to vim/vim, Subscribed
littlewu2508 left a comment (vim/vim#18938)

@rohieb Could you help review this please?


Reply to this email directly, view it on GitHub.

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

Reply all
Reply to author
Forward
0 new messages