diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-01-20 23:10:18 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-01-20 23:10:18 +0000 |
commit | b71eaaeaa8193b0cbb67496de6ad16ced80b8b09 (patch) | |
tree | 29e50b81ba2e1352e1f1940398e1b3507b8ea2c6 /src/ex_cmds.c | |
parent | 2d3f489e09a1cc50f5b7601eff568a4eb87fbd51 (diff) |
updated for version 7.0183v7.0183
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 10 |
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) |