diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-12 11:54:26 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-12 11:54:26 +0000 |
commit | 0aad88f073602849d1623122eb3c323f8e252def (patch) | |
tree | 7115bc876cb705e2e14da7b6eeeb6df02f0be535 /src | |
parent | 9954dc39ea090cee6bf41c888c41e60d9f52c3b8 (diff) |
patch 9.0.0862: default value of 'endoffile' is wrongv9.0.0862
Problem: Default value of 'endoffile' is wrong.
Solution: The default must be 'noendoffile'.
Diffstat (limited to 'src')
-rw-r--r-- | src/optiondefs.h | 2 | ||||
-rw-r--r-- | src/testdir/test_options.vim | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/optiondefs.h b/src/optiondefs.h index 43a334fc07..5b3860b613 100644 --- a/src/optiondefs.h +++ b/src/optiondefs.h @@ -857,7 +857,7 @@ static struct vimoption options[] = SCTX_INIT}, {"endoffile", "eof", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT, (char_u *)&p_eof, PV_EOF, - {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, {"endofline", "eol", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT, (char_u *)&p_eol, PV_EOL, {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim index 23c4077a91..30828e2da8 100644 --- a/src/testdir/test_options.vim +++ b/src/testdir/test_options.vim @@ -1453,5 +1453,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 diff --git a/src/version.c b/src/version.c index dd6927301c..8e970257b6 100644 --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 862, +/**/ 861, /**/ 860, |