diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/globals.h | 5 | ||||
-rw-r--r-- | src/nvim/mbyte.c | 18 | ||||
-rw-r--r-- | src/nvim/option.c | 12 | ||||
-rw-r--r-- | src/nvim/option_defs.h | 1 | ||||
-rw-r--r-- | src/nvim/po/zh_TW.UTF-8.po | 1 | ||||
-rw-r--r-- | src/nvim/po/zh_TW.po | 1 |
6 files changed, 4 insertions, 34 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h index b9a1916ef2..1d93900a94 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -753,11 +753,6 @@ EXTERN int has_mbyte INIT(= 0); /* any multi-byte encoding */ */ EXTERN char mb_bytelen_tab[256]; -/* Variables that tell what conversion is used for keyboard input and display - * output. */ -EXTERN vimconv_T input_conv; /* type of input conversion */ -EXTERN vimconv_T output_conv; /* type of output conversion */ - /* * Function pointers, used to quickly get to the right function. Each has * three possible values: latin_ (8-bit), utfc_ or utf_ (utf-8) and dbcs_ diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 71d2ceb037..b6e08ab277 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -58,16 +58,11 @@ * V * file * - * (1) Typed characters arrive in the current locale. Conversion is to be - * done when 'encoding' is different from 'termencoding'. + * (1) Typed characters arrive in the current locale. * (2) Text will be made available with the encoding specified with * 'encoding'. If this is not sufficient, system-specific conversion * might be required. * (3) For the GUI the correct font must be selected, no conversion done. - * Otherwise, conversion is to be done when 'encoding' differs from - * 'termencoding'. (Different in the GTK+ 2 port -- 'termencoding' - * is always used for both input and output and must always be set to - * "utf-8". gui_mch_init() does this automatically.) * (4) The encoding of the file is specified with 'fileencoding'. Conversion * is to be done when it's different from 'encoding'. * @@ -426,9 +421,6 @@ char_u * mb_init(void) /* Just starting up: set the whole table to one's. */ for (i = 0; i < 256; ++i) mb_bytelen_tab[i] = 1; - input_conv.vc_type = CONV_NONE; - input_conv.vc_factor = 1; - output_conv.vc_type = CONV_NONE; return NULL; } else if (STRNCMP(p_enc, "8bit-", 5) == 0 || STRNCMP(p_enc, "iso-8859-", 9) == 0) { @@ -3701,12 +3693,6 @@ bool iconv_enabled(bool verbose) void iconv_end(void) { - /* Don't use iconv() when inputting or outputting characters. */ - if (input_conv.vc_type == CONV_ICONV) - convert_setup(&input_conv, NULL, NULL); - if (output_conv.vc_type == CONV_ICONV) - convert_setup(&output_conv, NULL, NULL); - if (hIconvDLL != 0) FreeLibrary(hIconvDLL); if (hMsvcrtDLL != 0) @@ -3942,7 +3928,7 @@ char_u * string_convert_ext(vimconv_T *vcp, char_u *ptr, break; # ifdef USE_ICONV - case CONV_ICONV: /* conversion with output_conv.vc_fd */ + case CONV_ICONV: /* conversion with vcp->vc_fd */ retval = iconv_string(vcp, ptr, len, unconvlenp, lenp); break; # endif diff --git a/src/nvim/option.c b/src/nvim/option.c index 91c8493419..9201f7b6c4 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1501,7 +1501,7 @@ static vimoption_T (char_u *)&p_tbidi, PV_NONE, {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, {"termencoding", "tenc", P_STRING|P_VI_DEF|P_RCLR, - (char_u *)&p_tenc, PV_NONE, + (char_u *)NULL, PV_NONE, {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, {"terse", NULL, P_BOOL|P_VI_DEF, @@ -3705,7 +3705,7 @@ did_set_string_option ( errmsg = e_invarg; } /* 'encoding' and 'fileencoding' */ - else if (varp == &p_enc || gvarp == &p_fenc || varp == &p_tenc) { + else if (varp == &p_enc || gvarp == &p_fenc) { if (gvarp == &p_fenc) { if (!MODIFIABLE(curbuf) && opt_flags != OPT_GLOBAL) errmsg = e_modifiable; @@ -3738,14 +3738,6 @@ did_set_string_option ( if (varp == &p_enc && *curbuf->b_p_keymap != NUL) (void)keymap_init(); - /* When 'termencoding' is not empty and 'encoding' changes or when - * 'termencoding' changes, need to setup for keyboard input and - * display output conversion. */ - if (((varp == &p_enc && *p_tenc != NUL) || varp == &p_tenc)) { - convert_setup(&input_conv, p_tenc, p_enc); - convert_setup(&output_conv, p_enc, p_tenc); - } - } } else if (varp == &p_penc) { /* Canonize printencoding if VIM standard one */ diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h index daecfcdb8b..96824fdccf 100644 --- a/src/nvim/option_defs.h +++ b/src/nvim/option_defs.h @@ -553,7 +553,6 @@ EXTERN int p_tr; /* 'tagrelative' */ EXTERN char_u *p_tags; /* 'tags' */ EXTERN int p_tgst; /* 'tagstack' */ EXTERN int p_tbidi; /* 'termbidi' */ -EXTERN char_u *p_tenc; /* 'termencoding' */ EXTERN int p_terse; /* 'terse' */ EXTERN int p_to; /* 'tildeop' */ EXTERN int p_timeout; /* 'timeout' */ diff --git a/src/nvim/po/zh_TW.UTF-8.po b/src/nvim/po/zh_TW.UTF-8.po index 627389d8bf..79e09c83d1 100644 --- a/src/nvim/po/zh_TW.UTF-8.po +++ b/src/nvim/po/zh_TW.UTF-8.po @@ -35,7 +35,6 @@ # A. A simple configuration: # set encoding=utf-8; let $LANG='zh_TW.UTF-8'; # (set langmenu=none or ..) -# set termencoding=utf-8 # set fileencodings=ucs-bom,utf-8,japan,taiwan,prc # set fileencoding=taiwan (or utf-8) # diff --git a/src/nvim/po/zh_TW.po b/src/nvim/po/zh_TW.po index 9a7e6bf488..07d510c0c6 100644 --- a/src/nvim/po/zh_TW.po +++ b/src/nvim/po/zh_TW.po @@ -27,7 +27,6 @@ # A. A simple configuration: # set encoding=utf-8; let $LANG='zh_TW.UTF-8'; # (set langmenu=none or ..) -# set termencoding=utf-8 # set fileencodings=ucs-bom,utf-8,japan,taiwan,prc # set fileencoding=taiwan (or utf-8) # |