Skip to content

Commit 364fa5c

Browse files
committed
patch 7.4.1619
Problem: When 'fileformats' is set in the vimrc it applies to new buffers but not the initial buffer. Solution: Set 'fileformat' when starting up. (Mike Williams)
1 parent a4f6ca7 commit 364fa5c

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/option.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4017,6 +4017,15 @@ set_init_3(void)
40174017
}
40184018
#endif
40194019

4020+
if (bufempty())
4021+
{
4022+
int idx_ffs = findoption((char_u *)"ffs");
4023+
4024+
/* Apply the first entry of 'fileformats' to the initial buffer. */
4025+
if (idx_ffs >= 0 && (options[idx_ffs].flags & P_WAS_SET))
4026+
set_fileformat(default_fileformat(), OPT_LOCAL);
4027+
}
4028+
40204029
#ifdef FEAT_TITLE
40214030
set_title_defaults();
40224031
#endif

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1619,
751753
/**/
752754
1618,
753755
/**/

0 commit comments

Comments
 (0)