• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisión53fd0a213cff86b7185c5391cef34c1265f8b8f5 (tree)
Tiempo2007-05-02 02:05:03
Autorvimboss
Commitervimboss

Log Message

updated for version 7.0-237

Cambiar Resumen

Diferencia incremental

diff -r b77f790d53f6 -r 53fd0a213cff runtime/doc/options.txt
--- a/runtime/doc/options.txt Tue May 01 11:37:47 2007 +0000
+++ b/runtime/doc/options.txt Tue May 01 17:05:03 2007 +0000
@@ -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
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -528,7 +528,12 @@
528528 ':' is removed. Thus to include "\:" you have to specify "\\:".
529529
530530 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.
532537
533538 Hint: If you would like to do something else than setting an option, you could
534539 define an autocommand that checks the file for a specific string. For
@@ -4520,7 +4525,8 @@
45204525 languages, no matter what you set 'mkspellmem' to.
45214526
45224527 *'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)
45244530 local to buffer
45254531 *'modelines'* *'mls'*
45264532 'modelines' 'mls' number (default 5)
diff -r b77f790d53f6 -r 53fd0a213cff src/option.c
--- a/src/option.c Tue May 01 11:37:47 2007 +0000
+++ b/src/option.c Tue May 01 17:05:03 2007 +0000
@@ -3429,6 +3429,11 @@
34293429 /* the cast to long is required for Manx C, long_i is needed for
34303430 * MSVC */
34313431 *(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
34323437 /* May also set global value for local option. */
34333438 if (both)
34343439 *(int *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL) =
diff -r b77f790d53f6 -r 53fd0a213cff src/version.c
--- a/src/version.c Tue May 01 11:37:47 2007 +0000
+++ b/src/version.c Tue May 01 17:05:03 2007 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 237,
671+/**/
670672 236,
671673 /**/
672674 235,
Show on old repository browser