summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-01-20 23:10:18 +0000
committerBram Moolenaar <Bram@vim.org>2006-01-20 23:10:18 +0000
commitb71eaaeaa8193b0cbb67496de6ad16ced80b8b09 (patch)
tree29e50b81ba2e1352e1f1940398e1b3507b8ea2c6 /src/ex_cmds.c
parent2d3f489e09a1cc50f5b7601eff568a4eb87fbd51 (diff)
updated for version 7.0183v7.0183
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index e192d100c5..c8912cae0e 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2583,11 +2583,19 @@ do_write(eap)
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 @@ getfile(fnum, ffname, sfname, setpm, lnum, forceit)
int retval;
char_u *free_me = NULL;
- if (editing_cmdline())
+ if (text_locked())
return 1;
if (fnum == 0)