0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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

@@ -733,8 +733,7 @@ codepage_invalid:
// When using Unicode, set default for 'fileencodings'.
if (enc_utf8 && !option_was_set((char_u *)"fencs"))
set_string_option_direct((char_u *)"fencs", -1,
(char_u *)"ucs-bom,utf-8,default,latin1", OPT_FREE, 0);
set_fencs_unicode();
#if defined(HAVE_BIND_TEXTDOMAIN_CODESET) && defined(FEAT_GETTEXT)
// GNU gettext 0.10.37 supports this feature: set the codeset used for