]> granicus.if.org Git - vim/commitdiff
patch 8.0.0463: side effects from resetting 'compatible' in defaults.vim v8.0.0463
authorBram Moolenaar <Bram@vim.org>
Thu, 16 Mar 2017 13:19:36 +0000 (14:19 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 16 Mar 2017 13:19:36 +0000 (14:19 +0100)
Problem:    Resetting 'compatible' in defaults.vim has unexpected side
            effects. (David Fishburn)
Solution:   Only reset 'compatible' if it was set.

runtime/defaults.vim
src/version.c

index 43ff1e0fbed493fd35017f63e3020533eb0d0f41..69668f1c00eb4c26f4c9cc81b1a789dbb7c7ddf7 100644 (file)
@@ -1,7 +1,7 @@
 " The default vimrc file.
 "
 " Maintainer:  Bram Moolenaar <Bram@vim.org>
-" Last change: 2016 Sep 02
+" Last change: 2017 Mar 08
 "
 " This is loaded if no vimrc file was found.
 " Except when Vim is run with "-u NONE" or "-C".
@@ -21,7 +21,10 @@ endif
 
 " Use Vim settings, rather than Vi settings (much better!).
 " This must be first, because it changes other options as a side effect.
-set nocompatible
+" Avoid side effects when it was already reset.
+if &compatible
+  set nocompatible
+endif
 
 " Allow backspacing over everything in insert mode.
 set backspace=indent,eol,start
index ff1c9b84a0eba271bd85347d2f0f8ae8b7d37b33..c1ac29d92fbb3169e7f0afdcf4af542c2e432716 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    463,
 /**/
     462,
 /**/