• R/O
  • SSH

vim: 提交

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


Commit MetaInfo

修訂5ef53a1677ee9c831d7a18ee44d1041f182a82b2 (tree)
時間2007-09-06 23:35:35
作者vimboss
Commitervimboss

Log Message

updated for version 7.1-099

Change Summary

差異

diff -r 6fdbaf2bba04 -r 5ef53a1677ee src/option.c
--- a/src/option.c Thu Sep 06 12:26:44 2007 +0000
+++ b/src/option.c Thu Sep 06 14:35:35 2007 +0000
@@ -427,6 +427,8 @@
427427 #define P_NOGLOB 0x100000L/* do not use local value for global vimrc */
428428 #define P_NFNAME 0x200000L/* only normal file name chars allowed */
429429 #define P_INSECURE 0x400000L/* option was set from a modeline */
430+#define P_PRI_MKRC 0x800000L/* priority for :mkvimrc (setting option has
431+ side effects) */
430432
431433 #define ISK_LATIN1 (char_u *)"@,48-57,_,192-255"
432434
@@ -773,6 +775,8 @@
773775 {(char_u *)0L, (char_u *)0L}
774776 #endif
775777 },
778+ /* P_PRI_MKRC isn't needed here, optval_default()
779+ * always returns TRUE for 'compatible' */
776780 {"compatible", "cp", P_BOOL|P_RALL,
777781 (char_u *)&p_cp, PV_NONE,
778782 {(char_u *)TRUE, (char_u *)FALSE}},
@@ -1515,7 +1519,7 @@
15151519 {(char_u *)0L, (char_u *)0L}
15161520 #endif
15171521 },
1518- {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME,
1522+ {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME|P_PRI_MKRC,
15191523 #ifdef FEAT_KEYMAP
15201524 (char_u *)&p_keymap, PV_KMAP,
15211525 {(char_u *)"", (char_u *)0L}
@@ -1836,7 +1840,7 @@
18361840 {"paragraphs", "para", P_STRING|P_VI_DEF,
18371841 (char_u *)&p_para, PV_NONE,
18381842 {(char_u *)"IPLPPPQPP LIpplpipbp", (char_u *)0L}},
1839- {"paste", NULL, P_BOOL|P_VI_DEF,
1843+ {"paste", NULL, P_BOOL|P_VI_DEF|P_PRI_MKRC,
18401844 (char_u *)&p_paste, PV_NONE,
18411845 {(char_u *)FALSE, (char_u *)0L}},
18421846 {"pastetoggle", "pt", P_STRING|P_VI_DEF,
@@ -8535,13 +8539,20 @@
85358539 char_u *varp_local = NULL; /* fresh value */
85368540 char *cmd;
85378541 int round;
8542+ int pri;
85388543
85398544 /*
85408545 * The options that don't have a default (terminal name, columns, lines)
85418546 * are never written. Terminal options are also not written.
8547+ * Do the loop over "options[]" twice: once for options with the
8548+ * P_PRI_MKRC flag and once without.
85428549 */
8543- for (p = &options[0]; !istermoption(p); p++)
8544- if (!(p->flags & P_NO_MKRC) && !istermoption(p))
8550+ for (pri = 1; pri >= 0; --pri)
8551+ {
8552+ for (p = &options[0]; !istermoption(p); p++)
8553+ if (!(p->flags & P_NO_MKRC)
8554+ && !istermoption(p)
8555+ && ((pri == 1) == ((p->flags & P_PRI_MKRC) != 0)))
85458556 {
85468557 /* skip global option when only doing locals */
85478558 if (p->indir == PV_NONE && !(opt_flags & OPT_GLOBAL))
@@ -8637,6 +8648,7 @@
86378648 }
86388649 }
86398650 }
8651+ }
86408652 return OK;
86418653 }
86428654
diff -r 6fdbaf2bba04 -r 5ef53a1677ee src/version.c
--- a/src/version.c Thu Sep 06 12:26:44 2007 +0000
+++ b/src/version.c Thu Sep 06 14:35:35 2007 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 99,
671+/**/
670672 98,
671673 /**/
672674 97,
Show on old repository browser