runtime(make): Prevent makeTargetinDefine matching extra line

Commit: 
https://github.com/vim/vim/commit/7193cab6c88a6d81c9f302bf7f97810765e6d2be
Author: Yiyang Wu <[email protected]>
Date:   Sat Oct 25 14:19:07 2025 +0000

    runtime(make): Prevent makeTargetinDefine matching extra line
    
    This fixes a bug introduced in 2a33b499a3d7f46dc307234847a6562cef6cf1d8:
    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]>

diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim
index 8b6f04cbc..338150fa9 100644
--- a/runtime/syntax/make.vim
+++ b/runtime/syntax/make.vim
@@ -6,6 +6,7 @@
 " Last Change: 2022 Nov 06
 " 2025 Apr 15 by Vim project: rework Make flavor detection (#17089)
 " 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
 if exists("b:current_syntax")
@@ -65,6 +66,7 @@ syn match makeImplicit                "^\.[A-Za-z0-9_./       
 -]\+\s*:[^=]"me=e-2
 syn region makeTargetinDefine transparent matchgroup=makeTargetinDefine
        \ start="^[~A-Za-z0-9_./$(){}%-][A-Za-z0-9_./    
${}()%-]*&\?:\?:\{1,2}[^:=]"rs=e-1
        \ end="[^\]$"
+       \ keepend
 syn match makeTargetinDefine           "^[~A-Za-z0-9_./$(){}%*@-][A-Za-z0-9_./ 
 $(){}%*@-]*&\?::\=\s*$"
        \ contains=makeIdent,makeSpecTarget,makeComment
 

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vCfHW-001fi5-Ku%40256bit.org.

Raspunde prin e-mail lui