Mirror of the Vim source from https://github.com/vim/vim
Revisión | 53fd0a213cff86b7185c5391cef34c1265f8b8f5 (tree) |
---|---|
Tiempo | 2007-05-02 02:05:03 |
Autor | vimboss |
Commiter | vimboss |
updated for version 7.0-237
@@ -1,4 +1,4 @@ | ||
1 | -*options.txt* For Vim version 7.0. Last change: 2006 May 04 | |
1 | +*options.txt* For Vim version 7.0. Last change: 2007 May 01 | |
2 | 2 | |
3 | 3 | |
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -528,7 +528,12 @@ | ||
528 | 528 | ':' is removed. Thus to include "\:" you have to specify "\\:". |
529 | 529 | |
530 | 530 | No other commands than "set" are supported, for security reasons (somebody |
531 | -might create a Trojan horse text file with modelines). | |
531 | +might create a Trojan horse text file with modelines). And not all options | |
532 | +can be set. For some options a flag is set, so that when it's used the | |
533 | +|sandbox| is effective. Still, there is always a small risc that a modeline | |
534 | +causes trouble. E.g., when some joker sets 'textwidth' to 5 all your lines | |
535 | +are wrapped unexpectedly. So disable modelines before editing untrusted text. | |
536 | +The mail ftplugin does this, for example. | |
532 | 537 | |
533 | 538 | Hint: If you would like to do something else than setting an option, you could |
534 | 539 | define an autocommand that checks the file for a specific string. For |
@@ -4520,7 +4525,8 @@ | ||
4520 | 4525 | languages, no matter what you set 'mkspellmem' to. |
4521 | 4526 | |
4522 | 4527 | *'modeline'* *'ml'* *'nomodeline'* *'noml'* |
4523 | -'modeline' 'ml' boolean (Vim default: on, Vi default: off) | |
4528 | +'modeline' 'ml' boolean (Vim default: on (off for root), | |
4529 | + Vi default: off) | |
4524 | 4530 | local to buffer |
4525 | 4531 | *'modelines'* *'mls'* |
4526 | 4532 | 'modelines' 'mls' number (default 5) |
@@ -3429,6 +3429,11 @@ | ||
3429 | 3429 | /* the cast to long is required for Manx C, long_i is needed for |
3430 | 3430 | * MSVC */ |
3431 | 3431 | *(int *)varp = (int)(long)(long_i)options[opt_idx].def_val[dvi]; |
3432 | +#ifdef UNIX | |
3433 | + /* 'modeline' defaults to off for root */ | |
3434 | + if (options[opt_idx].indir == PV_ML && getuid() == ROOT_UID) | |
3435 | + *(int *)varp = FALSE; | |
3436 | +#endif | |
3432 | 3437 | /* May also set global value for local option. */ |
3433 | 3438 | if (both) |
3434 | 3439 | *(int *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL) = |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 237, | |
671 | +/**/ | |
670 | 672 | 236, |
671 | 673 | /**/ |
672 | 674 | 235, |