1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 16:23:14 +02:00

Fix terminal title when $TERM starts with "screen" (patch from sleo)

This commit is contained in:
Sebastien Helleu
2011-02-01 08:24:08 +01:00
parent 142fc29e25
commit 8392d2fbcc
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -1465,10 +1465,10 @@ gui_window_set_title (const char *title)
{
printf ("\33]0;%s\7", title);
}
else if (strcmp (envterm, "screen") == 0)
else if (strncmp (envterm, "screen", 6) == 0)
{
printf ("\033k%s\033\\", title);
/* tryning to set the title of a backgrounded xterm like terminal */
/* trying to set the title of a backgrounded xterm like terminal */
printf ("\33]0;%s\7", title);
}
}
@@ -1492,7 +1492,7 @@ gui_window_set_title (const char *title)
{
printf ("\33]0;%s\7", "Terminal");
}
else if (strcmp (envterm, "screen") == 0)
else if (strncmp (envterm, "screen", 6) == 0)
{
if (envshell)
{