diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2015-09-21 19:17:11 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2016-01-02 23:21:51 +0100 |
commit | 04bdeeb8b278ab995f9ea579a694a1c72eb196e6 (patch) | |
tree | 5931b004035ac811ac6a3310de63ad03e9384d56 /src | |
parent | 49b06a8f2a12f6553ad384032e108e351767ac1d (diff) | |
download | rneovim-04bdeeb8b278ab995f9ea579a694a1c72eb196e6.tar.gz rneovim-04bdeeb8b278ab995f9ea579a694a1c72eb196e6.tar.bz2 rneovim-04bdeeb8b278ab995f9ea579a694a1c72eb196e6.zip |
encoding: cleanup defaults of iskeyword, isprint and fileencodings
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/mbyte.c | 5 | ||||
-rw-r--r-- | src/nvim/option.c | 26 | ||||
-rw-r--r-- | src/nvim/options.lua | 9 |
3 files changed, 3 insertions, 37 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 44e30c1e7e..fdd83f9dac 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -568,11 +568,6 @@ char_u * mb_init(void) /* When enc_utf8 is set or reset, (de)allocate ScreenLinesUC[] */ screenalloc(false); - /* 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); - #ifdef HAVE_WORKING_LIBINTL /* GNU gettext 0.10.37 supports this feature: set the codeset used for * translated messages independently from the current locale. */ diff --git a/src/nvim/option.c b/src/nvim/option.c index 073ce6d39e..2ac1abeeba 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -233,12 +233,6 @@ typedef struct vimoption { #define P_CURSWANT 0x2000000U /* update curswant required; not needed when * there is a redraw flag */ -#define ISK_LATIN1 (char_u *)"@,48-57,_,192-255" - -/* 'isprint' for latin1 is also used for MS-Windows cp1252, where 0x80 is used - * for the currency sign. */ -# define ISP_LATIN1 (char_u *)"@,161-255" - #define HIGHLIGHT_INIT \ "8:SpecialKey,~:EndOfBuffer,z:TermCursor,Z:TermCursorNC,@:NonText," \ "d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr," \ @@ -789,26 +783,6 @@ void set_init_1(void) // Initialize multibyte (utf-8) handling mb_init(); -#if defined(MSWIN) || defined(MACOS) - if (STRCMP(p_enc, "latin1") == 0 - || enc_utf8 - ) { - /* Adjust the default for 'isprint' and 'iskeyword' to match - * latin1. */ - set_string_option_direct((char_u *)"isp", -1, - ISP_LATIN1, OPT_FREE, SID_NONE); - set_string_option_direct((char_u *)"isk", -1, - ISK_LATIN1, OPT_FREE, SID_NONE); - opt_idx = findoption((char_u *)"isp"); - if (opt_idx >= 0) - options[opt_idx].def_val[VIM_DEFAULT] = ISP_LATIN1; - opt_idx = findoption((char_u *)"isk"); - if (opt_idx >= 0) - options[opt_idx].def_val[VIM_DEFAULT] = ISK_LATIN1; - (void)init_chartab(); - } -#endif - // Don't change &encoding when resetting to defaults with ":set all&". opt_idx = findoption((char_u *)"encoding"); if (opt_idx >= 0) { diff --git a/src/nvim/options.lua b/src/nvim/options.lua index e485b90394..945626ff79 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -748,7 +748,7 @@ return { type='string', list='comma', scope={'global'}, vi_def=true, varname='p_fencs', - defaults={if_true={vi="ucs-bom"}} + defaults={if_true={vi="ucs-bom,utf-8,default,latin1"}} }, { full_name='fileformat', abbreviation='ff', @@ -1285,7 +1285,7 @@ return { vim=true, alloced=true, varname='p_isk', - defaults={if_true={vi="@,48-57,_", vim=macros('ISK_LATIN1')}} + defaults={if_true={vi="@,48-57,_", vim="@,48-57,_,192-255"}} }, { full_name='isprint', abbreviation='isp', @@ -1294,10 +1294,7 @@ return { vi_def=true, redraw={'all_windows'}, varname='p_isp', - defaults={ - condition='MSWIN', - if_true={vi="@,~-255"}, - if_false={vi=macros("ISP_LATIN1")} + defaults={if_true={vi="@,161-255"} } }, { |