mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -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...
|
* In general, proper xterm detection is a nightmarish task...
|
||||||
*
|
*
|
||||||
* -- Adam Borowski <kilobyte@mimuw.edu.pl> */
|
* -- Adam Borowski <kilobyte@mimuw.edu.pl> */
|
||||||
|
|
||||||
|
char *term = getenv("TERM");
|
||||||
|
|
||||||
|
if (term && !strncmp("xterm", term, 5)) {
|
||||||
|
xt = 1;
|
||||||
|
} else {
|
||||||
char *display = getenv("DISPLAY");
|
char *display = getenv("DISPLAY");
|
||||||
|
|
||||||
xt = (display && *display && check_more_envs());
|
xt = (display && *display && check_more_envs());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return xt;
|
return xt;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user