Mercurial > vim
annotate runtime/syntax/xxd.vim @ 28355:f1a3df11d013 v8.2.4703
patch 8.2.4703: memory leak in handling 'cinscopedecls'
Commit: https://github.com/vim/vim/commit/cb49a1d934d38cbc0d445af59b71ffe45cbcae75
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 7 13:08:00 2022 +0100
patch 8.2.4703: memory leak in handling 'cinscopedecls'
Problem: Memory leak in handling 'cinscopedecls'.
Solution: Free the memory before returning.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 07 Apr 2022 14:15:03 +0200 |
parents | 8edf0aeb71b9 |
children | 02bd0fe77c68 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: bin using xxd | |
19180 | 3 " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
4 " Last Change: Aug 31, 2016 |
19180 | 5 " Version: 11 |
7 | 6 " Notes: use :help xxd to see how to invoke it |
6479 | 7 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XXD |
7 | 8 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6479
diff
changeset
|
9 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6479
diff
changeset
|
10 if exists("b:current_syntax") |
7 | 11 finish |
12 endif | |
13 | |
14 syn match xxdAddress "^[0-9a-f]\+:" contains=xxdSep | |
15 syn match xxdSep contained ":" | |
16 syn match xxdAscii " .\{,16\}\r\=$"hs=s+2 contains=xxdDot | |
17 syn match xxdDot contained "[.\r]" | |
18 | |
19 " Define the default highlighting. | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
20 if !exists("skip_xxd_syntax_inits") |
7 | 21 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
22 hi def link xxdAddress Constant |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
23 hi def link xxdSep Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
24 hi def link xxdAscii Statement |
7 | 25 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
26 endif |
7 | 27 |
28 let b:current_syntax = "xxd" | |
29 | |
30 " vim: ts=4 |