annotate runtime/syntax/wdiff.vim @ 9967:45098d7f72b6 v7.4.2257

commit https://github.com/vim/vim/commit/9f28953f0c1e3d9fffd49af76503f54eaa279acb Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 26 16:39:03 2016 +0200 patch 7.4.2257 Problem: Coverity complains about not checking for NULL. Solution: Check for out of memory.
author Christian Brabandt <cb@256bit.org>
date Fri, 26 Aug 2016 16:45:07 +0200
parents 3fc0f57ecb91
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: wDiff (wordwise diff)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Gerfried Fuchs <alfie@ist.org>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 25 Apr 2001
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " URL: http://alfie.ist.org/vim/syntax/wdiff.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Comments are very welcome - but please make sure that you are commenting on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " the latest version of this file.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " SPAM is _NOT_ welcome - be ready to be reported!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn region wdiffOld start=+\[-+ end=+-]+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn region wdiffNew start="{+" end="+}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 if version >= 508 || !exists("did_wdiff_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 let did_wdiff_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 let did_wdiff_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 HiLink wdiffOld Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 HiLink wdiffNew Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 let b:current_syntax = "wdiff"