From c5bc221b277a48f5ef7aff0aae96c72f492999a6 Mon Sep 17 00:00:00 2001 From: Chris Pick Date: Fri, 21 Aug 2015 20:46:56 -0400 Subject: Use the $TERM value from fish's computed environment for ncurses setup Previously, the process's inherited $TERM value would be used. This prevented users from being able to set $TERM in their config.fish files. To make matters worse, the error message would print the computed $TERM value, giving the mistaken impression that it was being used. Signed-off-by: David Adam --- src/input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input.cpp') diff --git a/src/input.cpp b/src/input.cpp index 2b556c2a..aabd5b0e 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -466,7 +466,7 @@ int input_init() const env_var_t term = env_get_string(L"TERM"); int errret; - if (setupterm(0, STDOUT_FILENO, &errret) == ERR) + if (setupterm(const_cast(wcs2string(term).c_str()), STDOUT_FILENO, &errret) == ERR) { debug(0, _(L"Could not set up terminal")); if (errret == 0) -- cgit v1.2.3