annotate runtime/ftplugin/occam.vim @ 34892:58416c1d1b94 v9.1.0309

patch 9.1.0309: crash when 'textwidth' > MAX_INT Commit: https://github.com/vim/vim/commit/bba79808cb115d4f54063e8aa40628a927eab44e Author: Christian Brabandt <cb@256bit.org> Date: Thu Apr 11 22:54:44 2024 +0200 patch 9.1.0309: crash when 'textwidth' > MAX_INT Problem: crash when 'textwidth' > MAX_INT (after vv9.1.0055) (Zoltan Balogh) Solution: limit textwidth to MAX_INT fixes: #14482 closes: #14489 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 11 Apr 2024 23:15:03 +0200
parents 8ae680be2a51
children
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: occam
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Copyright: Christian Jacobsen <clj3@kent.ac.uk>, Mario Schweigler <ms44@kent.ac.uk>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Maintainer: Mario Schweigler <ms44@kent.ac.uk>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last Change: 23 April 2003
34134
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 3526
diff changeset
6 " 2024 Jan 14 by Vim Project (browsefilter)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " Only do this when not done yet for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if exists("b:did_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 let b:did_ftplugin = 1
3526
dd6c2497c997 Fix more 'cpo' issues in runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
13 let s:keepcpo= &cpo
dd6c2497c997 Fix more 'cpo' issues in runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
14 set cpo&vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 "{{{ Indent settings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " Set shift width for indent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 setlocal shiftwidth=2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " Set the tab key size to two spaces
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 setlocal softtabstop=2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " Let tab keys always be expanded to spaces
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 setlocal expandtab
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 "}}}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 "{{{ Formatting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Break comment lines and insert comment leader in this case
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 setlocal formatoptions-=t formatoptions+=cql
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 setlocal comments+=:--
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Maximum length of comments is 78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 setlocal textwidth=78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 "}}}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 "{{{ File browsing filters
34134
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 3526
diff changeset
34 " Win32 and GTK can filter files in the browse dialog
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 3526
diff changeset
35 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 3526
diff changeset
36 let b:browsefilter = "All Occam Files (*.occ, *.inc)\t*.occ;*.inc\n" .
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 \ "Occam Include Files (*.inc)\t*.inc\n" .
34134
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 3526
diff changeset
38 \ "Occam Source Files (*.occ)\t*.occ\n"
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 3526
diff changeset
39 if has("win32")
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 3526
diff changeset
40 let b:browsefilter .= "All Files (*.*)\t*\n"
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 3526
diff changeset
41 else
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 3526
diff changeset
42 let b:browsefilter .= "All Files (*)\t*\n"
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 3526
diff changeset
43 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 "}}}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
47 "{{{ Undo settings
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
48 let b:undo_ftplugin = "setlocal shiftwidth< softtabstop< expandtab<"
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
49 \ . " formatoptions< comments< textwidth<"
34134
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 3526
diff changeset
50 \ . "| unlet! b:browsefilter"
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
51 "}}}
3526
dd6c2497c997 Fix more 'cpo' issues in runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
52
dd6c2497c997 Fix more 'cpo' issues in runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
53 let &cpo = s:keepcpo
dd6c2497c997 Fix more 'cpo' issues in runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3410
diff changeset
54 unlet s:keepcpo