1
0
forked from aniani/vim

patch 8.0.0031

Problem:    After ":bwipeout" 'fileformat' is not set to the right default.
Solution:   Get the default from 'fileformats'. (Mike Williams)
This commit is contained in:
Bram Moolenaar
2016-10-12 17:45:29 +02:00
parent 0ba407012c
commit e8ef3a0934
5 changed files with 35 additions and 2 deletions

View File

@@ -10729,7 +10729,19 @@ buf_copy_options(buf_T *buf, int flags)
#ifdef FEAT_MBYTE
buf->b_p_fenc = vim_strsave(p_fenc);
#endif
buf->b_p_ff = vim_strsave(p_ff);
switch (*p_ffs)
{
case 'm':
buf->b_p_ff = vim_strsave((char_u *)FF_MAC); break;
case 'd':
buf->b_p_ff = vim_strsave((char_u *)FF_DOS); break;
case 'u':
buf->b_p_ff = vim_strsave((char_u *)FF_UNIX); break;
default:
buf->b_p_ff = vim_strsave(p_ff);
}
if (buf->b_p_ff != NULL)
buf->b_start_ffc = *buf->b_p_ff;
#if defined(FEAT_QUICKFIX)
buf->b_p_bh = empty_option;
buf->b_p_bt = empty_option;