aboutsummaryrefslogtreecommitdiffhomepage
path: root/input.cpp
diff options
context:
space:
mode:
authorGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2013-11-25 00:10:41 +0800
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2013-11-26 21:56:49 +0800
commit8d1667e9e8a7ad941419b017e9118d3f2c3f5af7 (patch)
tree787cea13a8efe6926b6eaa6e4b32a8d02dc4c602 /input.cpp
parent5b3397359f7f9bde9170246893c2bffd742b4f06 (diff)
more detailed debugging when terminal type cannot be found
Ref: #1060
Diffstat (limited to 'input.cpp')
-rw-r--r--input.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/input.cpp b/input.cpp
index b587fcba..7b63db1d 100644
--- a/input.cpp
+++ b/input.cpp
@@ -346,13 +346,18 @@ int input_init()
input_common_init(&interrupt_handler);
+ const env_var_t term = env_get_string(L"TERM");
int errret;
if (setupterm(0, STDOUT_FILENO, &errret) == ERR)
{
debug(0, _(L"Could not set up terminal"));
+ if (errret == 0)
+ {
+ debug(0, _(L"Check that your terminal type, '%ls', is supported on this system"),
+ term.c_str());
+ }
exit_without_destructors(1);
}
- const env_var_t term = env_get_string(L"TERM");
assert(! term.missing());
output_set_term(term);