diff options
author | Chris Pick <chris@chrispick.com> | 2015-08-21 20:46:56 -0400 |
---|---|---|
committer | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2015-09-09 17:06:13 +0800 |
commit | c5bc221b277a48f5ef7aff0aae96c72f492999a6 (patch) | |
tree | e574c71946ea5b4095953835ec53dd601073765b /src/input.cpp | |
parent | 7f28acc5ed53399570210afb98b461178bc9716d (diff) |
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 <zanchey@ucc.gu.uwa.edu.au>
Diffstat (limited to 'src/input.cpp')
-rw-r--r-- | src/input.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<char *>(wcs2string(term).c_str()), STDOUT_FILENO, &errret) == ERR) { debug(0, _(L"Could not set up terminal")); if (errret == 0) |