diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-07-24 15:02:03 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-07-24 15:02:03 +0200 |
commit | ad875fb7fff85d313fa35acde1afaec998d347d7 (patch) | |
tree | 384af81a849113f3c2fcc5c4abd66c126f4cc3e8 /src/ex_cmds.c | |
parent | e24a9c0b592a11743475166c873a5c346c65f73d (diff) | |
download | vim-ad875fb7fff85d313fa35acde1afaec998d347d7.zip |
updated for version 7.4a.041
Problem: When using ":new ++ff=unix" and "dos" is first in 'fileformats'
then 'ff' is set to "dos" instead of "unix". (Ingo Karkat)
Solution: Create set_file_options() and invoke it from do_ecmd().
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 445b66fee..c08bb21cb 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3448,9 +3448,13 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin) curwin->w_buffer = buf; curbuf = buf; ++curbuf->b_nwindows; - /* set 'fileformat' */ - if (*p_ffs && !oldbuf) - set_fileformat(default_fileformat(), OPT_LOCAL); + + /* Set 'fileformat', 'binary' and 'fenc' when forced. */ + if (!oldbuf && eap != NULL) + { + set_file_options(TRUE, eap); + set_forced_fenc(eap); + } } /* May get the window options from the last time this buffer |