aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/input.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input.cpp')
-rw-r--r--src/input.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/input.cpp b/src/input.cpp
index b9132b2c..71690217 100644
--- a/src/input.cpp
+++ b/src/input.cpp
@@ -344,8 +344,13 @@ int input_init() {
int err_ret;
if (setupterm(NULL, STDOUT_FILENO, &err_ret) == ERR) {
env_var_t term = env_get_string(L"TERM");
- debug(0, _(L"Your TERM value of '%ls' is not valid"), term.c_str());
- debug(0, _(L"Check that your terminal type is supported on this system"));
+ if (term.missing_or_empty()) {
+ debug(0, _(L"Your TERM is unset or empty."));
+ } else {
+ debug(0, _(L"Your TERM value of '%ls' is not valid"), term.c_str());
+ debug(0, _(L"Check that your terminal type is supported on this system"));
+ }
+
env_set(L"TERM", DEFAULT_TERM, ENV_GLOBAL | ENV_EXPORT);
if (setupterm(NULL, STDOUT_FILENO, &err_ret) == ERR) {
debug(0, _(L"Unable to setup terminal using your TERM or the '%ls' fallback"),