mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 04:16:38 +02:00
core: fix update of terminal title in some terminals like suckless terminal (stterm) (closes #1882)
This commit is contained in:
@@ -32,6 +32,7 @@ New features::
|
||||
* core, plugins: make many identifiers case sensitive (issue #1872, issue #398, bug #32213)
|
||||
* core: add item "mouse_status" in default status bar, change default color to lightgreen
|
||||
* core: add "stable-number" and "devel-number" in script version.sh
|
||||
* core: fix update of terminal title in some terminals like suckless terminal (stterm) (issue #1882)
|
||||
* api: add function config_set_version (issue #1238)
|
||||
* api: add optional argument with version in info "version_number"
|
||||
* alias: use lower case for default aliases, rename all aliases to lower case on upgrade (issue #1872)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user