aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2017-08-26 19:27:14 +0200
committerBoris Faure <billiob@gmail.com>2017-08-26 19:27:14 +0200
commit6bb1552c845f165ac1cb5cd3c04ffec446a86fe1 (patch)
treecba9c0648e381610fa98e74018fc64fb0c229f07
parentdo not add spurious whitespace when running a command (-e option) (diff)
downloadterminology-6bb1552c845f165ac1cb5cd3c04ffec446a86fe1.tar.gz
empty string resets tab title
-rw-r--r--src/bin/termio.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 8b97e41..2a12a02 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -371,12 +371,18 @@ void
termio_user_title_set(Evas_Object *obj, const char *title)
{
Termio *sd = evas_object_smart_data_get(obj);
+ size_t len;
EINA_SAFETY_ON_NULL_RETURN(sd);
if (sd->pty->prop.user_title)
eina_stringshare_del(sd->pty->prop.user_title);
+ sd->pty->prop.user_title = NULL;
- sd->pty->prop.user_title = eina_stringshare_add(title);
+ len = strlen(title);
+ if (len)
+ {
+ sd->pty->prop.user_title = eina_stringshare_add_length(title, len);
+ }
if (sd->pty->cb.set_title.func)
sd->pty->cb.set_title.func(sd->pty->cb.set_title.data);
}