aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Ennen <brcolow@users.noreply.github.com>2016-10-15 15:02:31 -0700
committerJustin M. Keyes <justinkz@gmail.com>2016-10-16 00:02:31 +0200
commit3a2903c83607e44677cab1dd8a4837e0022d41db (patch)
tree331aef8f9c828a9d406295af33a18740183c0d39 /src
parent4169fc82817f2edaf7a261eb78382ed0c2a3fe43 (diff)
downloadrneovim-3a2903c83607e44677cab1dd8a4837e0022d41db.tar.gz
rneovim-3a2903c83607e44677cab1dd8a4837e0022d41db.tar.bz2
rneovim-3a2903c83607e44677cab1dd8a4837e0022d41db.zip
vim-patch: 7.4.1619 (#5475)
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) https://github.com/vim/vim/commit/364fa5c7ec2a99a791c8f8b66fe70b0bf1dd9a41
Diffstat (limited to 'src')
-rw-r--r--src/nvim/option.c9
-rw-r--r--src/nvim/version.c2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index e2a5d38bee..81919c00d2 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -1032,6 +1032,15 @@ void set_init_3(void)
xfree(p);
}
+ 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);
+ }
+ }
+
set_title_defaults();
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 0e572f78e0..5bcd5ee8e3 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -824,7 +824,7 @@ static int included_patches[] = {
// 1622 NA
// 1621 NA
1620,
- // 1619,
+ 1619,
// 1618 NA
// 1617 NA
// 1616 NA