runtime(jjdescription): Don't require a space to start comments

Since jj v0.24.0 (December 2024), `JJ:` comments are recognised even
when not followed by a space.

closes: #17130

Signed-off-by: ash <ash@sorrel.sh>
Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
ash
2025-04-17 20:44:58 +02:00
committed by Christian Brabandt
parent cca5dea76e
commit 8f09684569

View File

@ -2,6 +2,7 @@
" Language: jj description
" Maintainer: Gregory Anders <greg@gpanders.com>
" Last Change: 2024 May 8
" 2025 Apr 17 by Vim Project (don't require space to start comments, #17130)
if exists('b:current_syntax')
finish
@ -11,7 +12,7 @@ syn match jjAdded "A .*" contained
syn match jjRemoved "D .*" contained
syn match jjChanged "M .*" contained
syn region jjComment start="^JJ: " end="$" contains=jjAdded,jjRemoved,jjChanged
syn region jjComment start="^JJ:" end="$" contains=jjAdded,jjRemoved,jjChanged
syn include @jjCommitDiff syntax/diff.vim
syn region jjCommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@jjCommitDiff