comparison src/ex_cmds.c @ 5231:74d2f3188cd0 v7.4a.041

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().
author Bram Moolenaar <bram@vim.org>
date Wed, 24 Jul 2013 15:02:03 +0200
parents 2fc1f3346bfb
children f0361e297d9c
comparison
equal deleted inserted replaced
5230:a25b52f7f08e 5231:74d2f3188cd0
3446 curwin->w_s = &(buf->b_s); 3446 curwin->w_s = &(buf->b_s);
3447 #endif 3447 #endif
3448 curwin->w_buffer = buf; 3448 curwin->w_buffer = buf;
3449 curbuf = buf; 3449 curbuf = buf;
3450 ++curbuf->b_nwindows; 3450 ++curbuf->b_nwindows;
3451 /* set 'fileformat' */ 3451
3452 if (*p_ffs && !oldbuf) 3452 /* Set 'fileformat', 'binary' and 'fenc' when forced. */
3453 set_fileformat(default_fileformat(), OPT_LOCAL); 3453 if (!oldbuf && eap != NULL)
3454 {
3455 set_file_options(TRUE, eap);
3456 set_forced_fenc(eap);
3457 }
3454 } 3458 }
3455 3459
3456 /* May get the window options from the last time this buffer 3460 /* May get the window options from the last time this buffer
3457 * was in this window (or another window). If not used 3461 * was in this window (or another window). If not used
3458 * before, reset the local window options to the global 3462 * before, reset the local window options to the global