annotate runtime/syntax/ps1xml.vim @ 27784:bfce04a99561 v8.2.4418

patch 8.2.4418: crash when using special multi-byte character Commit: https://github.com/vim/vim/commit/5921aeb5741fc6e84c870d68c7c35b93ad0c9f87 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 19 11:20:12 2022 +0000 patch 8.2.4418: crash when using special multi-byte character Problem: Crash when using special multi-byte character. Solution: Don't use isalpha() for an arbitrary character.
author Bram Moolenaar <Bram@vim.org>
date Sat, 19 Feb 2022 12:30:04 +0100
parents 5c98ea5f5d6e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24387
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: Windows PowerShell
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " URL: https://github.com/PProvost/vim-ps1
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Last Change: 2013 Jun 24
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 if exists("b:current_syntax")
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 finish
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 endif
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 let s:ps1xml_cpo_save = &cpo
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 set cpo&vim
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 doau syntax xml
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 unlet b:current_syntax
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 syn case ignore
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 syn include @ps1xmlScriptBlock <sfile>:p:h/ps1.vim
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 unlet b:current_syntax
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 syn region ps1xmlScriptBlock
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 \ matchgroup=xmlTag start="<Script>"
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 \ matchgroup=xmlEndTag end="</Script>"
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 \ fold
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 \ contains=@ps1xmlScriptBlock
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 \ keepend
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 syn region ps1xmlScriptBlock
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 \ matchgroup=xmlTag start="<ScriptBlock>"
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 \ matchgroup=xmlEndTag end="</ScriptBlock>"
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 \ fold
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 \ contains=@ps1xmlScriptBlock
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 \ keepend
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 syn region ps1xmlScriptBlock
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 \ matchgroup=xmlTag start="<GetScriptBlock>"
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 \ matchgroup=xmlEndTag end="</GetScriptBlock>"
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 \ fold
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 \ contains=@ps1xmlScriptBlock
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 \ keepend
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 syn region ps1xmlScriptBlock
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 \ matchgroup=xmlTag start="<SetScriptBlock>"
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 \ matchgroup=xmlEndTag end="</SetScriptBlock>"
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 \ fold
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 \ contains=@ps1xmlScriptBlock
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 \ keepend
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 syn cluster xmlRegionHook add=ps1xmlScriptBlock
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 let b:current_syntax = "ps1xml"
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 let &cpo = s:ps1xml_cpo_save
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 unlet s:ps1xml_cpo_save
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51