comparison runtime/syntax/diff.vim @ 23466:15fa3923cc49

Update runtime files. Commit: https://github.com/vim/vim/commit/7e6a515ed14e204fafb3dd6e98f2fb543e64aedd Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 2 16:39:53 2021 +0100 Update runtime files.
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 Jan 2021 16:45:04 +0100
parents 99ef85ff1af4
children 4027cefc2aab
comparison
equal deleted inserted replaced
23465:58bad104e7ee 23466:15fa3923cc49
1 " Vim syntax file 1 " Vim syntax file
2 " Language: Diff (context or unified) 2 " Language: Diff (context or unified)
3 " Maintainer: Bram Moolenaar <Bram@vim.org> 3 " Maintainer: Bram Moolenaar <Bram@vim.org>
4 " Translations by Jakson Alves de Aquino. 4 " Translations by Jakson Alves de Aquino.
5 " Last Change: 2020 Dec 07 5 " Last Change: 2020 Dec 30
6 6
7 " Quit when a (custom) syntax file was already loaded 7 " Quit when a (custom) syntax file was already loaded
8 if exists("b:current_syntax") 8 if exists("b:current_syntax")
9 finish 9 finish
10 endif 10 endif
346 syn match diffLine "^\d\+\(,\d\+\)\=[cda]\d\+\>.*" 346 syn match diffLine "^\d\+\(,\d\+\)\=[cda]\d\+\>.*"
347 347
348 syn match diffFile "^diff\>.*" 348 syn match diffFile "^diff\>.*"
349 syn match diffFile "^Index: .*" 349 syn match diffFile "^Index: .*"
350 syn match diffFile "^==== .*" 350 syn match diffFile "^==== .*"
351 " Old style diff uses *** for old and --- for new. 351
352 " Unified diff uses --- for old and +++ for new; names are wrong but it works. 352 if search('^@@ -\S\+ +\S\+ @@', 'nw', '', 100)
353 syn match diffOldFile "^+++ .*" 353 " unified
354 syn match diffOldFile "^\*\*\* .*" 354 syn match diffOldFile "^--- .*"
355 syn match diffNewFile "^--- .*" 355 syn match diffNewFile "^+++ .*"
356 else
357 " context / old style
358 syn match diffOldFile "^\*\*\* .*"
359 syn match diffNewFile "^--- .*"
360 endif
356 361
357 " Used by git 362 " Used by git
358 syn match diffIndexLine "^index \x\x\x\x.*" 363 syn match diffIndexLine "^index \x\x\x\x.*"
359 364
360 syn match diffComment "^#.*" 365 syn match diffComment "^#.*"