Mercurial > vim
annotate runtime/syntax/scdoc.vim @ 29664:6569c71c5ca5 v9.0.0172
patch 9.0.0172: trying to allocate zero bytes
Commit: https://github.com/vim/vim/commit/1024690c015921b0a458172bc368133f63af1b89
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 8 17:08:05 2022 +0100
patch 9.0.0172: trying to allocate zero bytes
Problem: Trying to allocate zero bytes.
Solution: Do not allocate the proptype array when there are none.
(closes #10867)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 08 Aug 2022 18:15:03 +0200 |
parents | cd68a630f0d0 |
children |
rev | line source |
---|---|
25619 | 1 " Syntax file for scdoc files |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
2 " Maintainer: Gregory Anders <contact@gpanders.com> |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
3 " Last Updated: 2022-05-09 |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
4 " Upstream: https://github.com/gpanders/vim-scdoc |
25619 | 5 |
6 if exists('b:current_syntax') | |
7 finish | |
8 endif | |
9 let b:current_syntax = 'scdoc' | |
10 | |
11 syntax match scdocFirstLineError "\%^.*$" | |
12 syntax match scdocFirstLineValid "\%^\S\+(\d[0-9A-Za-z]*)\%(\s\+\"[^"]*\"\%(\s\+\"[^"]*\"\)\=\)\=$" | |
13 | |
14 syntax region scdocCommentError start="^;\S" end="$" keepend | |
15 syntax region scdocComment start="^; " end="$" keepend | |
16 | |
17 syntax region scdocHeaderError start="^#\{3,}" end="$" keepend | |
18 syntax region scdocHeader start="^#\{1,2}" end="$" keepend | |
19 | |
20 syntax match scdocIndentError "^[ ]\+" | |
21 | |
22 syntax match scdocLineBreak "++$" | |
23 | |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
24 syntax region scdocOrderedListItem matchgroup=scdocOrderedListMarker start="^\z(\s*\)\." skip="^\z1 .*$" end="^" contains=scdocBold,scdocUnderline |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
25 syntax region scdocListItem matchgroup=scdocListMarker start="^\z(\s*\)-" skip="^\z1 .*$" end="^" contains=scdocBold,scdocUnderline |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
26 |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
27 " Tables cannot start with a column |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
28 syntax match scdocTableError "^:" |
25619 | 29 |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
30 syntax region scdocTable matchgroup=scdocTableEntry start="^[\[|\]][\[\-\]<=>]" end="^$" contains=scdocTableEntry,scdocTableError,scdocTableContinuation,scdocBold,scdocUnderline,scdocPre |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
31 syntax match scdocTableError "^.*$" contained |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
32 syntax match scdocTableContinuation "^ \+\S\+" contained |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
33 syntax match scdocTableEntry "^[|:][\[\-\]<=> ]" contained |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
34 syntax match scdocTableError "^[|:][\[\-\]<=> ]\S.*$" contained |
25619 | 35 |
36 syntax region scdocBold concealends matchgroup=scdocBoldDelimiter start="\\\@<!\*" end="\\\@<!\*" | |
37 syntax region scdocUnderline concealends matchgroup=scdocUnderlineDelimiter start="\<\\\@<!_" end="\\\@<!_\>" | |
38 syntax region scdocPre matchgroup=scdocPreDelimiter start="^\t*```" end="^\t*```" | |
39 | |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
40 syntax sync minlines=50 |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
41 |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
42 hi default link scdocFirstLineValid Comment |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
43 hi default link scdocComment Comment |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
44 hi default link scdocHeader Title |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
45 hi default link scdocOrderedListMarker Statement |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
46 hi default link scdocListMarker scdocOrderedListMarker |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
47 hi default link scdocLineBreak Special |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
48 hi default link scdocTableSpecifier Statement |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
49 hi default link scdocTableEntry Statement |
25619 | 50 |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
51 hi default link scdocFirstLineError Error |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
52 hi default link scdocCommentError Error |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
53 hi default link scdocHeaderError Error |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
54 hi default link scdocIndentError Error |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
55 hi default link scdocTableError Error |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
56 hi default link scdocTableError Error |
25619 | 57 |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
58 hi default link scdocPreDelimiter Delimiter |
25619 | 59 |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
60 hi default scdocBold term=bold cterm=bold gui=bold |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
61 hi default scdocUnderline term=underline cterm=underline gui=underline |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
62 hi default link scdocBoldDelimiter scdocBold |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
63 hi default link scdocUnderlineDelimiter scdocUnderline |