From 95d82fdb668b746ac100a8b7d2aca38038150707 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 29 Dec 2020 19:44:40 +0100 Subject: Update --- syntax/diff.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'syntax/diff.vim') diff --git a/syntax/diff.vim b/syntax/diff.vim index a11a58ae..c3eefbb7 100644 --- a/syntax/diff.vim +++ b/syntax/diff.vim @@ -6,7 +6,7 @@ endif " Language: Diff (context or unified) " Maintainer: Bram Moolenaar " Translations by Jakson Alves de Aquino. -" Last Change: 2016 Apr 02 +" Last Change: 2020 Dec 07 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -350,9 +350,11 @@ syn match diffLine "^---$" syn match diffLine "^\d\+\(,\d\+\)\=[cda]\d\+\>.*" syn match diffFile "^diff\>.*" -syn match diffFile "^+++ .*" syn match diffFile "^Index: .*" syn match diffFile "^==== .*" +" Old style diff uses *** for old and --- for new. +" Unified diff uses --- for old and +++ for new; names are wrong but it works. +syn match diffOldFile "^+++ .*" syn match diffOldFile "^\*\*\* .*" syn match diffNewFile "^--- .*" -- cgit v1.2.3