[vim/vim] Fix Makefile highlighting when parentheses are used inside quotes (PR #18818)

12 views
Skip to first unread message

Beleswar Prasad Padhi

unread,
Nov 27, 2025, 12:33:56 PMNov 27
to vim/vim, Subscribed

Problem: Makefile syntax highlighting incorrectly ends function calls
when encountering ')' inside double or single quoted strings,
causing incorrect highlighting for the remainder of the line.

Solution: Add makeDString and makeSString to the contains list for
makeIdent regions. This allows strings to be recognized inside
variable references and function calls.

Fixes: #18687

I have created this commit message following the style used in
recent commits. Feel free to let me know if that has to be
changed, and I will do so.


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

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

Commit Summary

  • 61a332f patch 9.1.1931: runtime: Makefile highlighting breaks with ')' in string

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/18818@github.com>

Christian Brabandt

unread,
Nov 27, 2025, 3:17:34 PMNov 27
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18818)

Is this correct? It looks like makeIdent can contain makeDstring, while at the same time makeDstring contains makeIdent. I don't think this works as expected?


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/18818/c3587182676@github.com>

Beleswar Prasad Padhi

unread,
Nov 27, 2025, 11:07:46 PMNov 27
to vim/vim, Subscribed
3V3RYONE left a comment (vim/vim#18818)

Hi @chrisbra

It looks like makeIdent can contain makeDstring, while at the same time makeDstring contains makeIdent.

Umm, why not..? This recursive loop should not be a problem. makeIdent contains itself too:

syn region makeIdent start=<...> end=<...> contains=makeStatement,makeIdent

For testing:
Before this patch:
Screenshot.2025-11-27.221025.png (view on web)

After this patch:
Screenshot.2025-11-27.220948.png (view on web)

Feel free to let me know if I am missing something


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/18818/c3587852280@github.com>

Christian Brabandt

unread,
Nov 28, 2025, 3:45:17 PMNov 28
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18818)

I see. I think this warrants a syntax test, don't you think?


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/18818/c3590403905@github.com>

Beleswar Prasad Padhi

unread,
Dec 2, 2025, 1:20:54 AMDec 2
to vim/vim, Subscribed
3V3RYONE left a comment (vim/vim#18818)

Sure, will add a test as well.


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/18818/c3600370004@github.com>

Christian Brabandt

unread,
4:33 PM (4 hours ago) 4:33 PM
to vim/vim, Subscribed

Closed #18818 via 519dc39.


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/18818/issue_event/21732906457@github.com>

Christian Brabandt

unread,
4:34 PM (4 hours ago) 4:34 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18818)

I included it with a syntax test


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/18818/c3688022289@github.com>

Reply all
Reply to author
Forward
0 new messages