1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[xterm] If TERM environment variable starts with "xterm", then it is xterm.

For ssh sessions.
This commit is contained in:
Witold Filipczyk 2022-12-17 10:31:42 +01:00
parent 2cb2da87f2
commit 25515d707a

View File

@ -349,10 +349,17 @@ is_xterm(void)
* In general, proper xterm detection is a nightmarish task...
*
* -- Adam Borowski <kilobyte@mimuw.edu.pl> */
char *term = getenv("TERM");
if (term && !strncmp("xterm", term, 5)) {
xt = 1;
} else {
char *display = getenv("DISPLAY");
xt = (display && *display && check_more_envs());
}
}
return xt;
}