Skip to content

Commit 7193cab

Browse files
littlewu2508chrisbra
authored andcommitted
runtime(make): Prevent makeTargetinDefine matching extra line
This fixes a bug introduced in 2a33b49: When makeTargetinDefine ends with makeIdent, makeSpecTarget or makeComment, the following line is also matched as makeTargetinDefine. So, add keepend to prevent that just as makeTarget does. related: #18403 closes: #18570 Signed-off-by: Yiyang Wu <[email protected]> Signed-off-by: Roland Hieber <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent 418ff51 commit 7193cab

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

runtime/syntax/make.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
" Last Change: 2022 Nov 06
77
" 2025 Apr 15 by Vim project: rework Make flavor detection (#17089)
88
" 2025 Oct 12 by Vim project: update makeDefine highlighting (#18403)
9+
" 2025 Oct 25 by Vim project: update makeTargetinDefine highlighting (#18570)
910

1011
" quit when a syntax file was already loaded
1112
if exists("b:current_syntax")
@@ -65,6 +66,7 @@ syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2
6566
syn region makeTargetinDefine transparent matchgroup=makeTargetinDefine
6667
\ start="^[~A-Za-z0-9_./$(){}%-][A-Za-z0-9_./\t ${}()%-]*&\?:\?:\{1,2}[^:=]"rs=e-1
6768
\ end="[^\\]$"
69+
\ keepend
6870
syn match makeTargetinDefine "^[~A-Za-z0-9_./$(){}%*@-][A-Za-z0-9_./\t $(){}%*@-]*&\?::\=\s*$"
6971
\ contains=makeIdent,makeSpecTarget,makeComment
7072

0 commit comments

Comments
 (0)