Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@3V3RYONE
Copy link

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.

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: vim#18687

Signed-off-by: Beleswar Prasad Padhi <[email protected]>
@chrisbra
Copy link
Member

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?

@3V3RYONE
Copy link
Author

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

After this patch:
Screenshot 2025-11-27 220948

Feel free to let me know if I am missing something

@chrisbra
Copy link
Member

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

@3V3RYONE
Copy link
Author

3V3RYONE commented Dec 2, 2025

Sure, will add a test as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Makefile syntax bug: parenthesis inside of strings used as function arguments break highlighting.

2 participants