vim-patch:8.2.2993: 'fileencodings' default value should depend on 'encoding' (#31379)

Problem:    'fileencodings' default value should depend on 'encoding'. (Gary
            Johnson)
Solution:   When 'encoding' is "utf-8" use a different default value for
            'fileencodings'.

5ffefbb35a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2024-11-29 10:06:12 +08:00
committed by GitHub
parent 27965627a4
commit 1536f79d86

View File

@@ -2252,6 +2252,14 @@ func Test_opt_default()
call assert_equal('vt', &formatoptions)
set formatoptions&vim
call assert_equal('tcq', &formatoptions)
call assert_equal('ucs-bom,utf-8,default,latin1', &fencs)
set fencs=latin1
set fencs&
call assert_equal('ucs-bom,utf-8,default,latin1', &fencs)
set fencs=latin1
set all&
call assert_equal('ucs-bom,utf-8,default,latin1', &fencs)
endfunc
" Test for the 'cmdheight' option