Mercurial > vim
diff src/ex_cmds.c @ 634:1c586ee8dd45 v7.0183
updated for version 7.0183
author | vimboss |
---|---|
date | Fri, 20 Jan 2006 23:10:18 +0000 |
parents | b6632d553df3 |
children | a420bba0d851 |
line wrap: on
line diff
--- 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, lnu int retval; char_u *free_me = NULL; - if (editing_cmdline()) + if (text_locked()) return 1; if (fnum == 0)