updated for version 7.0183
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index e192d10..c8912ca 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2583,11 +2583,19 @@
retval = FAIL;
goto theend;
}
+
+ /* If 'filetype' was empty try detecting it now. */
+ if (*curbuf->b_p_ft == NUL)
+ {
+ (void)do_doautocmd((char_u *)"filetypedetect BufRead", TRUE);
+ do_modelines(FALSE);
+ }
#endif
}
retval = buf_write(curbuf, ffname, fname, eap->line1, eap->line2,
eap, eap->append, eap->forceit, TRUE, FALSE);
+
}
theend:
@@ -2861,7 +2869,7 @@
int retval;
char_u *free_me = NULL;
- if (editing_cmdline())
+ if (text_locked())
return 1;
if (fnum == 0)