From 5f0fbe7c2fae82c3bf911d726af483c8a0983379 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 6 Aug 2022 08:29:57 +0800 Subject: vim-patch:8.1.0942: options window still checks for the multi_byte feature (#19652) Problem: Options window still checks for the multi_byte feature. Solution: Remove the unnecessary check. (Dominique Pelle, closes vim/vim#3990) https://github.com/vim/vim/commit/76cbe811dafea0609e87ee4b9d025e2387e20fac --- runtime/optwin.vim | 62 ++++++++++++++++++++++++------------------------------ 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/runtime/optwin.vim b/runtime/optwin.vim index 228336e5a4..02cf573ea3 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -665,12 +665,10 @@ if has("printer") call append("$", "printencoding\tencoding used to print the PostScript file for :hardcopy") call OptionG("penc", &penc) endif - if has("multi_byte") - call append("$", "printmbcharset\tthe CJK character set to be used for CJK output from :hardcopy") - call OptionG("pmbcs", &pmbcs) - call append("$", "printmbfont\tlist of font names to be used for CJK output from :hardcopy") - call OptionG("pmbfn", &pmbfn) - endif + call append("$", "printmbcharset\tthe CJK character set to be used for CJK output from :hardcopy") + call OptionG("pmbcs", &pmbcs) + call append("$", "printmbfont\tlist of font names to be used for CJK output from :hardcopy") + call OptionG("pmbfn", &pmbfn) endif call Header("messages and info") @@ -981,11 +979,9 @@ call BinOptionL("eol") call append("$", "fixendofline\tfixes missing end-of-line at end of text file") call append("$", "\t(local to buffer)") call BinOptionL("fixeol") -if has("multi_byte") - call append("$", "bomb\tprepend a Byte Order Mark to the file") - call append("$", "\t(local to buffer)") - call BinOptionL("bomb") -endif +call append("$", "bomb\tprepend a Byte Order Mark to the file") +call append("$", "\t(local to buffer)") +call BinOptionL("bomb") call append("$", "fileformat\tend-of-line format: \"dos\", \"unix\" or \"mac\"") call append("$", "\t(local to buffer)") call OptionL("ff") @@ -1204,30 +1200,28 @@ if has("xim") endif -if has("multi_byte") - call Header("multi-byte characters") - call AddOption("encoding", "character encoding used in Nvim: \"utf-8\"") - call OptionG("enc", &enc) - call append("$", "fileencoding\tcharacter encoding for the current file") - call append("$", "\t" .. s:local_to_buffer) - call OptionL("fenc") - call append("$", "fileencodings\tautomatically detected character encodings") - call OptionG("fencs", &fencs) - call append("$", "charconvert\texpression used for character encoding conversion") - call OptionG("ccv", &ccv) - call append("$", "delcombine\tdelete combining (composing) characters on their own") - call BinOptionG("deco", &deco) - call append("$", "maxcombine\tmaximum number of combining (composing) characters displayed") - call OptionG("mco", &mco) - if has("xim") && has("gui_gtk") - call append("$", "imactivatekey\tkey that activates the X input method") - call OptionG("imak", &imak) - endif - call append("$", "ambiwidth\twidth of ambiguous width characters") - call OptionG("ambw", &ambw) - call append("$", "emoji\temoji characters are full width") - call BinOptionG("emo", &emo) +call Header("multi-byte characters") +call AddOption("encoding", "character encoding used in Nvim: \"utf-8\"") +call OptionG("enc", &enc) +call append("$", "fileencoding\tcharacter encoding for the current file") +call append("$", "\t" .. s:local_to_buffer) +call OptionL("fenc") +call append("$", "fileencodings\tautomatically detected character encodings") +call OptionG("fencs", &fencs) +call append("$", "charconvert\texpression used for character encoding conversion") +call OptionG("ccv", &ccv) +call append("$", "delcombine\tdelete combining (composing) characters on their own") +call BinOptionG("deco", &deco) +call append("$", "maxcombine\tmaximum number of combining (composing) characters displayed") +call OptionG("mco", &mco) +if has("xim") && has("gui_gtk") + call append("$", "imactivatekey\tkey that activates the X input method") + call OptionG("imak", &imak) endif +call append("$", "ambiwidth\twidth of ambiguous width characters") +call OptionG("ambw", &ambw) +call append("$", "emoji\temoji characters are full width") +call BinOptionG("emo", &emo) call Header("various") -- cgit