0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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().
This commit is contained in:
Bram Moolenaar
2013-07-24 15:02:03 +02:00
parent e24a9c0b59
commit ad875fb7ff
6 changed files with 77 additions and 30 deletions

View File

@@ -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