]> granicus.if.org Git - vim/commitdiff
patch 8.2.1776: filetype.vim may be loaded twice v8.2.1776
authorBram Moolenaar <Bram@vim.org>
Wed, 30 Sep 2020 20:45:39 +0000 (22:45 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 30 Sep 2020 20:45:39 +0000 (22:45 +0200)
Problem:    Filetype.vim may be loaded twice.
Solution:   Do "syntax on" after "filetype on". (Adam Stankiewicz,
            closes #7049)

runtime/defaults.vim
src/version.c

index e881604020b536276f614d5c243c6e0e9d3a6f11..c15d743c0e6a0553b934be6e108ba176f3cb092b 100644 (file)
@@ -85,17 +85,6 @@ if has('mouse')
   endif
 endif
 
-" Switch syntax highlighting on when the terminal has colors or when using the
-" GUI (which always has colors).
-if &t_Co > 2 || has("gui_running")
-  " Revert with ":syntax off".
-  syntax on
-
-  " I like highlighting strings inside C comments.
-  " Revert with ":unlet c_comment_strings".
-  let c_comment_strings=1
-endif
-
 " Only do this part when Vim was compiled with the +eval feature.
 if 1
 
@@ -124,6 +113,17 @@ if 1
 
 endif
 
+" Switch syntax highlighting on when the terminal has colors or when using the
+" GUI (which always has colors).
+if &t_Co > 2 || has("gui_running")
+  " Revert with ":syntax off".
+  syntax on
+
+  " I like highlighting strings inside C comments.
+  " Revert with ":unlet c_comment_strings".
+  let c_comment_strings=1
+endif
+
 " Convenient command to see the difference between the current buffer and the
 " file it was loaded from, thus the changes you made.
 " Only define it when not defined already.
index 26285fbc451c6dcc8b7160dc98ee1ff669909897..b3014bb5bb17b95b3f170146e10b5c9acbf35dc3 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1776,
 /**/
     1775,
 /**/