annotate runtime/syntax/nosyntax.vim @ 19237:1a3ebc75cf39 v8.2.0177

patch 8.2.0177: memory leak in get_tags() Commit: https://github.com/vim/vim/commit/70b3e706b40fc2c84c1f9f33fa64945a481df395 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 29 22:38:45 2020 +0100 patch 8.2.0177: memory leak in get_tags() Problem: Memory leak in get_tags(). Solution: Free matches when finding a pseudo-tag line. (Dominique Pelle, closes #5553)
author Bram Moolenaar <Bram@vim.org>
date Wed, 29 Jan 2020 22:45:08 +0100
parents 5117153003bd
children 4027cefc2aab
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 support file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Maintainer: Bram Moolenaar <Bram@vim.org>
834
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
3 " Last Change: 2006 Apr 16
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " This file is used for ":syntax off".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " It removes the autocommands and stops highlighting for all buffers.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if !has("syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
834
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
12 " Remove all autocommands for the Syntax event. This also avoids that
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
13 " "syntax=foo" in a modeline triggers the SynSet() function of synload.vim.
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
14 au! Syntax
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
15
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " remove all syntax autocommands and remove the syntax for each buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 augroup syntaxset
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 au!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 au BufEnter * syn clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 au BufEnter * if exists("b:current_syntax") | unlet b:current_syntax | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 doautoall syntaxset BufEnter *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 au!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 augroup END
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 if exists("syntax_on")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 unlet syntax_on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 if exists("syntax_manual")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 unlet syntax_manual
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 endif