1
0
forked from aniani/vim

patch 8.2.2993: 'fileencodings' default value should depend on 'encoding'

Problem:    'fileencodings' default value should depend on 'encoding'. (Gary
            Johnson)
Solution:   When 'encoding' is "utf-8" use a different default value for
            'fileencodings'.
This commit is contained in:
Bram Moolenaar
2021-06-13 20:27:36 +02:00
parent 2346a63784
commit 5ffefbb35a
5 changed files with 31 additions and 3 deletions

View File

@@ -1140,6 +1140,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