Mercurial > vim
annotate runtime/syntax/sd.vim @ 22256:c3c9830c7cdc v8.2.1677
patch 8.2.1677: memory access errors when calling setloclist() in autocommand
Commit: https://github.com/vim/vim/commit/4d170af0a9379da64d67dc3fa7cc7297956c6f52
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 13 22:21:22 2020 +0200
patch 8.2.1677: memory access errors when calling setloclist() in autocommand
Problem: Memory access errors when calling setloclist() in an autocommand.
Solution: Give an error if the list was changed unexpectedly. (closes https://github.com/vim/vim/issues/6946)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 13 Sep 2020 22:30:03 +0200 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
1121 | 1 " Language: streaming descriptor file |
2 " Maintainer: Puria Nafisi Azizi (pna) <pna@netstudent.polito.it> | |
3 " License: This file can be redistribued and/or modified under the same terms | |
4 " as Vim itself. | |
5 " URL: http://netstudent.polito.it/vim_syntax/ | |
3312 | 6 " Last Change: 2012 Feb 03 by Thilo Six |
1121 | 7 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
8 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
9 if exists("b:current_syntax") |
1121 | 10 finish |
11 endif | |
12 | |
3312 | 13 let s:cpo_save = &cpo |
14 set cpo&vim | |
15 | |
1121 | 16 " Always ignore case |
17 syn case ignore | |
18 | |
19 " Comments | |
20 syn match sdComment /\s*[#;].*$/ | |
21 | |
22 " IP Adresses | |
23 syn cluster sdIPCluster contains=sdIPError,sdIPSpecial | |
24 syn match sdIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained | |
25 syn match sdIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained | |
26 syn match sdIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@sdIPCluster | |
27 | |
28 " Statements | |
3312 | 29 syn keyword sdStatement AGGREGATE AUDIO_CHANNELS |
1121 | 30 syn keyword sdStatement BYTE_PER_PCKT BIT_PER_SAMPLE BITRATE |
31 syn keyword sdStatement CLOCK_RATE CODING_TYPE CREATOR | |
32 syn match sdStatement /^\s*CODING_TYPE\>/ nextgroup=sdCoding skipwhite | |
33 syn match sdStatement /^\s*ENCODING_NAME\>/ nextgroup=sdEncoding skipwhite | |
34 syn keyword sdStatement FILE_NAME FRAME_LEN FRAME_RATE FORCE_FRAME_RATE | |
3312 | 35 syn keyword sdStatement LICENSE |
1121 | 36 syn match sdStatement /^\s*MEDIA_SOURCE\>/ nextgroup=sdSource skipwhite |
37 syn match sdStatement /^\s*MULTICAST\>/ nextgroup=sdIP skipwhite | |
38 syn keyword sdStatement PAYLOAD_TYPE PKT_LEN PRIORITY | |
39 syn keyword sdStatement SAMPLE_RATE | |
40 syn keyword sdStatement TITLE TWIN | |
41 syn keyword sdStatement VERIFY | |
42 | |
43 " Known Options | |
44 syn keyword sdEncoding H26L MPV MP2T MP4V-ES | |
45 syn keyword sdCoding FRAME SAMPLE | |
46 syn keyword sdSource STORED LIVE | |
47 | |
48 "Specials | |
49 syn keyword sdSpecial TRUE FALSE NULL | |
50 syn keyword sdDelimiter STREAM STREAM_END | |
51 syn match sdError /^search .\{257,}/ | |
52 | |
53 | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
54 hi def link sdIP Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
55 hi def link sdHostname Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
56 hi def link sdEncoding Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
57 hi def link sdCoding Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
58 hi def link sdSource Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
59 hi def link sdComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
60 hi def link sdIPError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
61 hi def link sdError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
62 hi def link sdStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
63 hi def link sdIPSpecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
64 hi def link sdSpecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
65 hi def link sdDelimiter Delimiter |
1121 | 66 |
67 | |
68 let b:current_syntax = "sd" | |
3312 | 69 |
70 let &cpo = s:cpo_save | |
71 unlet s:cpo_save |