annotate runtime/syntax/sm.vim @ 34603:02fbe0bd9418 v9.1.0193

patch 9.1.0193: May leak memory in completion when ga_grow() fails Commit: https://github.com/vim/vim/commit/70e566b0bd29189b1baf3dc915b6a98de36fbded Author: zeertzjq <zeertzjq@outlook.com> Date: Thu Mar 21 07:11:58 2024 +0100 patch 9.1.0193: May leak memory in completion when ga_grow() fails Problem: May leak memory in completion when ga_grow() fails. Solution: Free "wca" when ga_grow() fails (zeertzjq). fixes: #14248 closes: #14249 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 21 Mar 2024 07:15:05 +0100
parents 02bd0fe77c68
children
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: sendmail
34375
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 19180
diff changeset
3 " Maintainer: This runtime file is looking for a new maintainer.
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 19180
diff changeset
4 " Former Maintainer: Charles E. Campbell
10306
d75e2380db0e commit https://github.com/vim/vim/commit/6d5ad4c4118cab5fd96db157621c3aa9af368edb
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
5 " Last Change: Oct 25, 2016
34375
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 19180
diff changeset
6 " 2024 Feb 19 by Vim Project (announce adoption)
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10306
diff changeset
7 " Version: 9
34375
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 19180
diff changeset
8 " Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SM
6484
ce4ecfbebded Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6479
diff changeset
9 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn match smComment "^#.*$" contains=@Spell
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " Definitions, Classes, Files, Options, Precedence, Trusted Users, Mailers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn match smDefine "^[CDF]."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match smDefine "^O[AaBcdDeFfgHiLmNoQqrSsTtuvxXyYzZ]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match smDefine "^O\s"he=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match smDefine "^M[a-zA-Z0-9]\+,"he=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match smDefine "^T" nextgroup=smTrusted
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match smDefine "^P" nextgroup=smMesg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match smTrusted "\S\+$" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match smMesg "\S*="he=e-1 contained nextgroup=smPrecedence
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match smPrecedence "-\=[0-9]\+" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " Header Format H?list-of-mailer-flags?name: format
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match smHeaderSep contained "[?:]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match smHeader "^H\(?[a-zA-Z]\+?\)\=[-a-zA-Z_]\+:" contains=smHeaderSep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " Variables
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match smVar "\$[a-z\.\|]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " Rulesets
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match smRuleset "^S\d*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " Rewriting Rules
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match smRewrite "^R" skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsUser
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match smRewriteLhsUser contained "[^\t$]\+" skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsSep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match smRewriteLhsToken contained "\(\$[-*+]\|\$[-=][A-Za-z]\|\$Y\)\+" skipwhite nextgroup=smRewriteLhsUser,smRewriteLhsSep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match smRewriteLhsSep contained "\t\+" skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsUser
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match smRewriteRhsUser contained "[^\t$]\+" skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsSep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match smRewriteRhsToken contained "\(\$\d\|\$>\d\|\$#\|\$@\|\$:[-_a-zA-Z]\+\|\$[[\]]\|\$@\|\$:\|\$[A-Za-z]\)\+" skipwhite nextgroup=smRewriteRhsUser,smRewriteRhsSep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match smRewriteRhsSep contained "\t\+" skipwhite nextgroup=smRewriteComment,smRewriteRhsSep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match smRewriteRhsSep contained "$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match smRewriteComment contained "[^\t$]*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " Clauses
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match smClauseError "\$\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match smElse contained "\$|"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match smClauseCont contained "^\t"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn region smClause matchgroup=Delimiter start="\$?." matchgroup=Delimiter end="\$\." contains=smElse,smClause,smVar,smClauseCont
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6744
diff changeset
60 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
62 hi def link smClause Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
63 hi def link smClauseError Error
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
64 hi def link smComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
65 hi def link smDefine Statement
10306
d75e2380db0e commit https://github.com/vim/vim/commit/6d5ad4c4118cab5fd96db157621c3aa9af368edb
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
66 hi def link smElse Delimiter
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
67 hi def link smHeader Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
68 hi def link smHeaderSep String
10306
d75e2380db0e commit https://github.com/vim/vim/commit/6d5ad4c4118cab5fd96db157621c3aa9af368edb
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
69 hi def link smMesg Special
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
70 hi def link smPrecedence Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
71 hi def link smRewrite Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
72 hi def link smRewriteComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
73 hi def link smRewriteLhsToken String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
74 hi def link smRewriteLhsUser Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
75 hi def link smRewriteRhsToken String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
76 hi def link smRuleset Preproc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
77 hi def link smTrusted Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
78 hi def link smVar String
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 let b:current_syntax = "sm"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 " vim: ts=18