From 77b61cb0dff55318fdec9e28ccbaedd051996c5a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 3 Jan 2020 00:42:52 -0500 Subject: option: restore termencoding (readonly) #11662 'termencoding' option was removed in abaabd1d03fd723630f6addeadee9928faa4cdde but some plugins check its value. --- src/nvim/option.c | 7 +++++++ src/nvim/testdir/test_python3.vim | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/option.c b/src/nvim/option.c index de25ee3218..a8a4ad6484 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -4737,6 +4737,13 @@ bool get_tty_option(char *name, char **value) return true; } + if (strequal(name, "tenc") || strequal(name, "termencoding")) { + if (value) { + *value = xstrdup("utf-8"); + } + return true; + } + if (strequal(name, "ttytype")) { if (value) { *value = p_ttytype ? xstrdup(p_ttytype) : xstrdup("nvim"); diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index 948ef0a07f..d0f80b8958 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -174,7 +174,6 @@ func Test_Catch_Exception_Message() endfunc func Test_unicode() - throw 'skipped: Nvim does not support "termencoding" option and only supports "utf-8" for "encoding" option' " this crashed Vim once if &tenc != '' throw "Skipped: 'termencoding' is not empty" -- cgit