aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/options.lua2
-rw-r--r--src/nvim/testdir/test_options.vim12
2 files changed, 13 insertions, 1 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index e938760e67..dc0561d560 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -649,7 +649,7 @@ return {
no_mkrc=true,
redraw={'statuslines'},
varname='p_eof',
- defaults={if_true=true}
+ defaults={if_true=false}
},
{
full_name='endofline', abbreviation='eol',
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim
index db544e47b8..11c2977a4e 100644
--- a/src/nvim/testdir/test_options.vim
+++ b/src/nvim/testdir/test_options.vim
@@ -1264,5 +1264,17 @@ func Test_keywordprg_empty()
let &keywordprg = k
endfunc
+" check that the very first buffer created does not have 'endoffile' set
+func Test_endoffile_default()
+ let after =<< trim [CODE]
+ call writefile([execute('set eof?')], 'Xtestout')
+ qall!
+ [CODE]
+ if RunVim([], after, '')
+ call assert_equal(["\nnoendoffile"], readfile('Xtestout'))
+ endif
+ call delete('Xtestout')
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab