annotate runtime/ftplugin/csh.vim @ 33160:4ecf54d709b3 v9.0.1862

patch 9.0.1862: Vim9 Garbage Collection issues Commit: https://github.com/vim/vim/commit/e651e110c17656a263dd017b14c85b332163a58d Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Mon Sep 4 07:51:01 2023 +0200 patch 9.0.1862: Vim9 Garbage Collection issues Problem: Vim9 Garbage Collection issues Solution: Class members are garbage collected early leading to use-after-free problems. Handle the garbage collection of classes properly. closes: #13019 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
author Christian Brabandt <cb@256bit.org>
date Mon, 04 Sep 2023 08:00:06 +0200
parents c968191a8557
children 09e8f7ac05e0
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 filetype plugin file
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
2 " Language: csh
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
28010
c968191a8557 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25973
diff changeset
4 " Previous Maintainer: Dan Sharp
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
5 " Contributor: Johannes Zellner <johannes@zellner.org>
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
6 " Last Change: 2021 Oct 15
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if exists("b:did_ftplugin") | finish | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 let s:save_cpo = &cpo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 set cpo-=C
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
14 setlocal comments=:#
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 setlocal commentstring=#%s
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 setlocal formatoptions-=t
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 setlocal formatoptions+=crql
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
19 let b:undo_ftplugin = "setlocal com< cms< fo<"
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
20
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " Csh: thanks to Johannes Zellner
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " - Both foreach and end must appear alone on separate lines.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " - The words else and endif must appear at the beginning of input lines;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " the if must appear alone on its input line or after an else.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " - Each case label and the default label must appear at the start of a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " - while and end must appear alone on their input lines.
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
28 if exists("loaded_matchit") && !exists("b:match_words")
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
29 let s:line_start = '\%(^\s*\)\@<='
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
30 let b:match_words =
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
31 \ s:line_start .. 'if\s*(.*)\s*then\>:' ..
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
32 \ s:line_start .. 'else\s\+if\s*(.*)\s*then\>:' .. s:line_start .. 'else\>:' ..
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
33 \ s:line_start .. 'endif\>,' ..
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
34 \ s:line_start .. '\%(\<foreach\s\+\h\w*\|while\)\s*(:' ..
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
35 \ '\<break\>:\<continue\>:' ..
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
36 \ s:line_start .. 'end\>,' ..
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
37 \ s:line_start .. 'switch\s*(:' ..
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
38 \ s:line_start .. 'case\s\+:' .. s:line_start .. 'default\>:\<breaksw\>:' ..
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
39 \ s:line_start .. 'endsw\>'
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
40 unlet s:line_start
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
41 let b:undo_ftplugin ..= " | unlet b:match_words"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
25973
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
44 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
45 let b:browsefilter="csh Scripts (*.csh)\t*.csh\n" ..
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
46 \ "All Files (*.*)\t*.*\n"
3b34837f4538 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
47 let b:undo_ftplugin ..= " | unlet b:browsefilter"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 let &cpo = s:save_cpo
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
51 unlet s:save_cpo