vim-patch:9.0.0816: CTRL-Z at end of file is always dropped

Problem:    CTRL-Z at end of file is always dropped.
Solution:   Add the 'endoffile' option, like the 'endofline' option.
            (closes vim/vim#11408, closes vim/vim#11397)

Cherry-pick test_fixeol.vim changes from patch 8.2.1432.
Cherry-pick 'endoffile' changes from latest Vim runtime update.

fb0cf2357e

vim-patch:f0b567e32a46

Revert unintended Makefile change

f0b567e32a

vim-patch:72c8e3c070b3

Fix wrong struct access for member.

72c8e3c070

vim-patch:3f68a4136eb9

Add missing entry for the 'endoffile' option.

3f68a4136e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-10-29 09:03:15 +08:00
parent 8d38e1ad34
commit feabc1c98c
9 changed files with 48 additions and 11 deletions

View File

@@ -640,6 +640,15 @@ return {
varname='p_enc',
defaults={if_true=macros('ENC_DFLT')}
},
{
full_name='endoffile', abbreviation='eof',
short_desc=N_("write CTRL-Z for last line in file"),
type='bool', scope={'buffer'},
no_mkrc=true,
redraw={'statuslines'},
varname='p_eof',
defaults={if_true=true}
},
{
full_name='endofline', abbreviation='eol',
short_desc=N_("write <EOL> for last line in file"),