Problem: Default value of 'endoffile' is wrong.
Solution: The default must be 'noendoffile'.
not set yet, the default for 'fileencodings' is changed.
*'endoffile'* *'eof'* *'noendoffile'* *'noeof'*
-'endoffile' 'eof' boolean (default on)
+'endoffile' 'eof' boolean (default off)
local to buffer
Indicates that a CTRL-Z character was found at the end of the file
when reading it. Normally only happens when 'fileformat' is "dos".
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},
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 862,
/**/
861,
/**/