Mercurial > vim
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 |
rev | line source |
---|---|
7 | 1 " Vim filetype plugin file |
2 " Language: occam | |
3 " Copyright: Christian Jacobsen <clj3@kent.ac.uk>, Mario Schweigler <ms44@kent.ac.uk> | |
4 " Maintainer: Mario Schweigler <ms44@kent.ac.uk> | |
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 | 7 |
8 " Only do this when not done yet for this buffer | |
9 if exists("b:did_ftplugin") | |
10 finish | |
11 endif | |
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 | 15 |
16 "{{{ Indent settings | |
17 " Set shift width for indent | |
18 setlocal shiftwidth=2 | |
19 " Set the tab key size to two spaces | |
20 setlocal softtabstop=2 | |
21 " Let tab keys always be expanded to spaces | |
22 setlocal expandtab | |
23 "}}} | |
24 | |
25 "{{{ Formatting | |
26 " Break comment lines and insert comment leader in this case | |
27 setlocal formatoptions-=t formatoptions+=cql | |
28 setlocal comments+=:-- | |
29 " Maximum length of comments is 78 | |
30 setlocal textwidth=78 | |
31 "}}} | |
32 | |
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 | 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 | 44 endif |
45 "}}} | |
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 |