From 08118fe6f27af83d68693f96e67abda837ed4b9d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 10 Apr 2026 09:59:11 +0800 Subject: [PATCH] vim-patch:9598174: runtime(jjdescription): Anchor status matches to start of line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The regex for status line highlighting was too broad, `jjComment` lines containing e.g. the letter 'A' followed by a space anywhere in the line were highlighted. related: vim/vim#19879 https://github.com/vim/vim/commit/959817472dd64bae17c8db47e82097533e088013 Co-authored-by: Joël Stemmer --- runtime/syntax/jjdescription.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/runtime/syntax/jjdescription.vim b/runtime/syntax/jjdescription.vim index bd1c6f22fd..28e396f9f4 100644 --- a/runtime/syntax/jjdescription.vim +++ b/runtime/syntax/jjdescription.vim @@ -3,14 +3,15 @@ " Maintainer: Gregory Anders " Last Change: 2024 May 8 " 2025 Apr 17 by Vim Project (don't require space to start comments, #17130) +" 2026 Apr 09 by Vim Project (anchor status regex to beginning of line, #19879) if exists('b:current_syntax') finish endif -syn match jjAdded "A .*" contained -syn match jjRemoved "D .*" contained -syn match jjChanged "M .*" contained +syn match jjAdded "^JJ:\s\+\zsA\s.*" contained +syn match jjRemoved "^JJ:\s\+\zsD\s.*" contained +syn match jjChanged "^JJ:\s\+\zsM\s.*" contained syn region jjComment start="^JJ:" end="$" contains=jjAdded,jjRemoved,jjChanged