option: restore termencoding (readonly) #11662

'termencoding' option was removed in abaabd1d03
but some plugins check its value.
This commit is contained in:
Jan Edmund Lazo
2020-01-03 00:42:52 -05:00
committed by Justin M. Keyes
parent 0c436559df
commit 77b61cb0df
2 changed files with 7 additions and 1 deletions

View File

@@ -4737,6 +4737,13 @@ bool get_tty_option(char *name, char **value)
return true; return true;
} }
if (strequal(name, "tenc") || strequal(name, "termencoding")) {
if (value) {
*value = xstrdup("utf-8");
}
return true;
}
if (strequal(name, "ttytype")) { if (strequal(name, "ttytype")) {
if (value) { if (value) {
*value = p_ttytype ? xstrdup(p_ttytype) : xstrdup("nvim"); *value = p_ttytype ? xstrdup(p_ttytype) : xstrdup("nvim");

View File

@@ -174,7 +174,6 @@ func Test_Catch_Exception_Message()
endfunc endfunc
func Test_unicode() func Test_unicode()
throw 'skipped: Nvim does not support "termencoding" option and only supports "utf-8" for "encoding" option'
" this crashed Vim once " this crashed Vim once
if &tenc != '' if &tenc != ''
throw "Skipped: 'termencoding' is not empty" throw "Skipped: 'termencoding' is not empty"