syntax: don't override user settings

This commit is contained in:
Felipe Morales
2016-02-12 18:02:42 +01:00
committed by Justin M. Keyes
parent cae0904160
commit 9c2c24ec48
2 changed files with 7 additions and 11 deletions

View File

@@ -9299,19 +9299,15 @@ static void ex_filetype(exarg_T *eap)
EMSG2(_(e_invarg2), arg);
}
/// Same as :filetype plugin indent enable
/// Updates the state used for :filetype without args.
/// Do ":filetype plugin indent on" if user did not already do some
/// permutation thereof.
void force_enable_filetype(void)
{
if (!filetype_detect) {
if (!filetype_detect && !filetype_plugin && !filetype_indent) {
source_runtime((char_u *)FILETYPE_FILE, true);
filetype_detect = true;
}
if (!filetype_plugin) {
source_runtime((char_u *)FTPLUGIN_FILE, true);
filetype_plugin = true;
}
if (!filetype_indent) {
source_runtime((char_u *)INDENT_FILE, true);
filetype_indent = true;
}