1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 22:06:38 +02:00

core: fix update of terminal title in some terminals like suckless terminal (stterm) (closes #1882)

This commit is contained in:
Sébastien Helleu
2023-04-23 22:01:39 +02:00
parent 2d93f9d703
commit 9f5e8efbe0
2 changed files with 6 additions and 11 deletions
+5 -11
View File
@@ -2589,17 +2589,6 @@ gui_window_set_title (const char *title)
{
printf ("\033&f0k%dD%s", (int)(strlen (new_title) + 1), new_title);
}
/* the following terminals support the xterm escape codes */
else if ((strncmp (envterm, "xterm", 5) == 0)
|| (strncmp (envterm, "rxvt", 4) == 0)
|| (strncmp (envterm, "alacritty", 9) == 0)
|| (strcmp (envterm, "Eterm") == 0)
|| (strcmp (envterm, "aixterm") == 0)
|| (strcmp (envterm, "iris-ansi") == 0)
|| (strcmp (envterm, "dtterm") == 0))
{
printf ("\33]0;%s\7", new_title);
}
else if ((strncmp (envterm, "screen", 6) == 0)
|| (strncmp (envterm, "tmux", 4) == 0))
{
@@ -2632,6 +2621,11 @@ gui_window_set_title (const char *title)
/* trying to set the title of a backgrounded xterm like terminal */
printf ("\33]0;%s\7", new_title);
}
else
{ /* we suppose all other terminals support the xterm escape codes */
printf ("\33]0;%s\7", new_title);
}
fflush (stdout);
free (new_title);