Mercurial > vim
annotate runtime/syntax/debchangelog.vim @ 31355:45a03dd92f28 v9.0.1011
patch 9.0.1011: ml_get error when using screenpos()
Commit: https://github.com/vim/vim/commit/99d19438cabaf13074229d9a32e3a4af9ce98744
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Dec 5 16:23:24 2022 +0000
patch 9.0.1011: ml_get error when using screenpos()
Problem: ml_get error when using screenpos().
Solution: Give an error for the line number. (closes https://github.com/vim/vim/issues/11661)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 05 Dec 2022 17:30:06 +0100 |
parents | 5acd6f02ea35 |
children | cc751d944b7e |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
835 | 2 " Language: Debian changelog files |
13231 | 3 " Maintainer: Debian Vim Maintainers |
1620 | 4 " Former Maintainers: Gerfried Fuchs <alfie@ist.org> |
5 " Wichert Akkerman <wakkerma@debian.org> | |
31028 | 6 " Last Change: 2022 Oct 29 |
13231 | 7 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim |
7 | 8 |
9 " Standard syntax initialization | |
13857 | 10 if exists('b:current_syntax') |
7 | 11 finish |
12 endif | |
13 | |
14 " Case doesn't matter for us | |
15 syn case ignore | |
16 | |
15729 | 17 let s:urgency='urgency=\(low\|medium\|high\|emergency\|critical\)\( [^[:space:],][^,]*\)\=' |
11518 | 18 let s:binNMU='binary-only=yes' |
6823 | 19 |
18489 | 20 let s:cpo = &cpo |
21 set cpo-=C | |
22 let s:supported = [ | |
29533 | 23 \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy', |
31028 | 24 \ 'buster', 'bullseye', 'bookworm', 'trixie', 'forky', |
18489 | 25 \ |
31028 | 26 \ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic', 'lunar', |
26050 | 27 \ 'devel' |
18489 | 28 \ ] |
29 let s:unsupported = [ | |
30 \ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', | |
22824 | 31 \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy', |
29533 | 32 \ 'jessie', 'stretch', |
18489 | 33 \ |
34 \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', | |
35 \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', | |
36 \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', | |
19303 | 37 \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic', |
29533 | 38 \ 'disco', 'eoan', 'hirsute', 'impish', 'groovy' |
18489 | 39 \ ] |
40 let &cpo=s:cpo | |
41 | |
7 | 42 " Define some common expressions we can use later on |
2034 | 43 syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ " |
11518 | 44 exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"' |
45 exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"' | |
18489 | 46 exe 'syn match debchangelogTarget contained "\%( \%('.join(s:supported, '\|').'\)\>[-[:alnum:]]*\)\+"' |
47 exe 'syn match debchangelogUnsupportedTarget contained "\%( \%('.join(s:unsupported, '\|').'\)\>[-[:alnum:]]*\)\+"' | |
19303 | 48 syn match debchangelogUnreleased contained / UNRELEASED/ |
7 | 49 syn match debchangelogVersion contained "(.\{-})" |
1620 | 50 syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" |
51 syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" | |
7 | 52 syn match debchangelogEmail contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+" |
53 syn match debchangelogEmail contained "<.\{-}>" | |
54 | |
55 " Define the entries that make up the changelog | |
18489 | 56 syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogFirstKV,debchangelogOtherKV,debchangelogTarget,debchangelogUnsupportedTarget,debchangelogUnreleased,debchangelogVersion,debchangelogBinNMU oneline |
7 | 57 syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline |
1620 | 58 syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses,debchangelogLP oneline |
7 | 59 |
60 " Associate our matches and regions with pretty colours | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
61 hi def link debchangelogHeader Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
62 hi def link debchangelogFooter Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
63 hi def link debchangelogEntry Normal |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
64 hi def link debchangelogCloses Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
65 hi def link debchangelogLP Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
66 hi def link debchangelogFirstKV Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
67 hi def link debchangelogOtherKV Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
68 hi def link debchangelogName Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
69 hi def link debchangelogVersion Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
70 hi def link debchangelogTarget Identifier |
18489 | 71 hi def link debchangelogUnsupportedTarget Identifier |
72 hi def link debchangelogUnreleased WarningMsg | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
73 hi def link debchangelogEmail Special |
7 | 74 |
13857 | 75 let b:current_syntax = 'debchangelog' |
7 | 76 |
77 " vim: ts=8 sw=2 |