mirror of
https://github.com/vim/vim.git
synced 2025-11-14 23:04:02 -05:00
runtime(make): Prevent makeTargetinDefine matching extra line
This fixes a bug introduced in 2a33b499a3:
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 <xgreenlandforwyy@gmail.com>
Signed-off-by: Roland Hieber <rohieb+vim-iR0jGdkV@rohieb.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
418ff5185e
commit
7193cab6c8
@@ -6,6 +6,7 @@
|
|||||||
" Last Change: 2022 Nov 06
|
" Last Change: 2022 Nov 06
|
||||||
" 2025 Apr 15 by Vim project: rework Make flavor detection (#17089)
|
" 2025 Apr 15 by Vim project: rework Make flavor detection (#17089)
|
||||||
" 2025 Oct 12 by Vim project: update makeDefine highlighting (#18403)
|
" 2025 Oct 12 by Vim project: update makeDefine highlighting (#18403)
|
||||||
|
" 2025 Oct 25 by Vim project: update makeTargetinDefine highlighting (#18570)
|
||||||
|
|
||||||
" quit when a syntax file was already loaded
|
" quit when a syntax file was already loaded
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
@@ -65,6 +66,7 @@ syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2
|
|||||||
syn region makeTargetinDefine transparent matchgroup=makeTargetinDefine
|
syn region makeTargetinDefine transparent matchgroup=makeTargetinDefine
|
||||||
\ start="^[~A-Za-z0-9_./$(){}%-][A-Za-z0-9_./\t ${}()%-]*&\?:\?:\{1,2}[^:=]"rs=e-1
|
\ start="^[~A-Za-z0-9_./$(){}%-][A-Za-z0-9_./\t ${}()%-]*&\?:\?:\{1,2}[^:=]"rs=e-1
|
||||||
\ end="[^\\]$"
|
\ end="[^\\]$"
|
||||||
|
\ keepend
|
||||||
syn match makeTargetinDefine "^[~A-Za-z0-9_./$(){}%*@-][A-Za-z0-9_./\t $(){}%*@-]*&\?::\=\s*$"
|
syn match makeTargetinDefine "^[~A-Za-z0-9_./$(){}%*@-][A-Za-z0-9_./\t $(){}%*@-]*&\?::\=\s*$"
|
||||||
\ contains=makeIdent,makeSpecTarget,makeComment
|
\ contains=makeIdent,makeSpecTarget,makeComment
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user