vim-patch:e7efe7f: runtime(jjdescription): configure spell checking (#42637)

Problem:  Vim spell checks comments and text after `JJ: ignore-rest` in
          jjdescription files.
Solution: Restrict spell checking to the description before the ignore-rest
          marker, excluding JJ comments (Martin Fischer).

closes: vim/vim#21633

https://github.com/vim/vim/commit/e7efe7f3f9160431287878361f7050f6aad45c36

Co-authored-by: Martin Fischer <martin@push-f.com>
This commit is contained in:
zeertzjqandMartin Fischer authored and GitHub committed 2026-11-01 22:50:56 +08:00
1 parent e1a1ef620e
commit 8876e363ae
1 file changed
+6
+6
View File
@@ -5,11 +5,17 @@
" 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)
" 2026 Apr 09 by Vim Project (detect renames of files, #19879)
" 2026 Oct 24 by Vim Project (configure spell checking, #21633)
if exists('b:current_syntax')
finish
endif
if has('spell')
syn spell notoplevel
syn region jjDescriptionSpell start="\%^" end="^JJ: ignore-rest$"me=s-1 contains=jjComment,@Spell
endif
syn match jjAdded "^JJ:\s\+\zsA\s.*" contained
syn match jjRemoved "^JJ:\s\+\zsD\s.*" contained
syn match jjChanged "^JJ:\s\+\zsM\s.*" contained