]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(make): fix wrong highlighting with $ inside double quotes
authorChristian Brabandt <cb@256bit.org>
Thu, 16 Apr 2026 21:25:43 +0000 (21:25 +0000)
committerChristian Brabandt <cb@256bit.org>
Thu, 16 Apr 2026 21:25:43 +0000 (21:25 +0000)
fixes: #19986

Co-authored-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/syntax/make.vim
runtime/syntax/testdir/dumps/make_01_00.dump
runtime/syntax/testdir/input/make_01.mak

index 0e973237a5be7ac0dbbe6c90ab4e30068c302abf..530b41e0e9f175040595f8952140c85e140dd651 100644 (file)
@@ -9,6 +9,7 @@
 " 2025 Oct 25 by Vim project: update makeTargetinDefine highlighting (#18570)
 " 2025 Dec 23 by Vim project: fix too greedy match (#18938)
 " 2025 Dec 23 by Vim project: wrong highlight with paranthesis inside quotes (#18818)
+" 2026 Apr 17 by Vim project: wrong highlight $ inside quotes (#19986)
 
 " quit when a syntax file was already loaded
 if exists("b:current_syntax")
@@ -41,7 +42,7 @@ endif
 syn match makeIdent    "\$\$\w*"
 syn match makeIdent    "\$\$\$\$\w*" containedin=makeDefine
 syn match makeIdent    "\$[^({]"
-syn match makeIdent    "\$\$[^({]" containedin=makeDefine
+syn match makeIdent    "\$\$[^({\"']" containedin=makeDefine
 if get(b:, 'make_flavor', s:make_flavor) == 'microsoft'
   syn region makeIdent start="\$(" end=")" contains=makeStatement,makeIdent,makeDString,makeSString
   syn region makeIdent start="\${" end="}" contains=makeStatement,makeIdent,makeDString,makeSString
index d476fcd2ace696ec8bb7835ca596a879aa481c22..cf31afb97350b16cb627e515f2cec7f19db33f95 100644 (file)
@@ -14,7 +14,7 @@
 @75
 |d+0#00e0e07&|e|f|a|u|l|t|:| +0#0000000&@66
 | +0#e000002&@7|$+0#00e0e07&|(|c+0#af5f00255&|a|l@1| +0#00e0e07&|s|a|y|,|"+0#e000002&|H|e|l@1|o| |(|w|o|r|l|d|)|!|"|)+0#00e0e07&| +0#0000000&@38
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-| +0#0000000&@56|1|,|1| @10|A|l@1| 
+@75
+|f+0#00e0e07&|o@1|:| +0#0000000&@70
+| +0#e000002&@7|e|c|h|o| |"|b|a|r|$+0#00e0e07&@1|"+0#e000002&| |b|a|z| +0#0000000&@50
+@57|1|,|1| @10|A|l@1| 
index e97c13c0aa09d72f6c88bb0fea19be5ddf56b8fa..082972a59ccfdbbb31aefacb151171d930e075d3 100644 (file)
@@ -14,3 +14,6 @@ endef
 
 default:
        $(call say,"Hello (world)!")
+
+foo:
+       echo "bar$$" baz