summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 616f9a303..8a706afbd 100644
--- a/src/option.c
+++ b/src/option.c
@@ -4017,6 +4017,15 @@ set_init_3(void)
}
#endif
+ if (bufempty())
+ {
+ int idx_ffs = findoption((char_u *)"ffs");
+
+ /* Apply the first entry of 'fileformats' to the initial buffer. */
+ if (idx_ffs >= 0 && (options[idx_ffs].flags & P_WAS_SET))
+ set_fileformat(default_fileformat(), OPT_LOCAL);
+ }
+
#ifdef FEAT_TITLE
set_title_defaults();
#endif