From 1d71e1d987f330cae33f3d6026c26ffbb6c5b585 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 29 Dec 2023 00:28:28 +0100 Subject: [PATCH] vim-patch:757714c0cba7 runtime(git): Make diffs foldable https://github.com/vim/vim/commit/757714c0cba7772b987b2513559bcb74ce53ce3f Co-authored-by: Tim Pope --- runtime/syntax/git.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/syntax/git.vim b/runtime/syntax/git.vim index bf013ce195..51eb8127dd 100644 --- a/runtime/syntax/git.vim +++ b/runtime/syntax/git.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: generic git output " Maintainer: Tim Pope -" Last Change: 2022 Jan 05 +" Last Change: 2023 Dec 28 if exists("b:current_syntax") finish @@ -38,7 +38,7 @@ syn match gitReflog /^\x\{40,\} \x\{40,\} .\{-\}\d\+\s-\d\{4\}\t.*/ skipwhite c syn region gitDiff start=/^\%(diff --git \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff fold syn region gitDiff start=/^\%(@@ -\)\@=/ end=/^\%(diff --\%(git\|cc\|combined\) \|$\)\@=/ contains=@gitDiff -syn region gitDiffMerge start=/^\%(diff --\%(cc\|combined\) \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff +syn region gitDiffMerge start=/^\%(diff --\%(cc\|combined\) \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff fold syn region gitDiffMerge start=/^\%(@@@@* -\)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff syn match gitDiffAdded "^ \++.*" contained containedin=gitDiffMerge syn match gitDiffAdded "{+[^}]*+}" contained containedin=gitDiff