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:
parent
2cb2da87f2
commit
25515d707a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user