summaryrefslogtreecommitdiff
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
parent669533fef55cede04b18a2b5f56a0c7feb242c67 (diff)
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
371termio_user_title_set(Evas_Object *obj, const char *title) 371termio_user_title_set(Evas_Object *obj, const char *title)
372{ 372{
373 Termio *sd = evas_object_smart_data_get(obj); 373 Termio *sd = evas_object_smart_data_get(obj);
374 size_t len;
374 EINA_SAFETY_ON_NULL_RETURN(sd); 375 EINA_SAFETY_ON_NULL_RETURN(sd);
375 376
376 if (sd->pty->prop.user_title) 377 if (sd->pty->prop.user_title)
377 eina_stringshare_del(sd->pty->prop.user_title); 378 eina_stringshare_del(sd->pty->prop.user_title);
379 sd->pty->prop.user_title = NULL;
378 380
379 sd->pty->prop.user_title = eina_stringshare_add(title); 381 len = strlen(title);
382 if (len)
383 {
384 sd->pty->prop.user_title = eina_stringshare_add_length(title, len);
385 }
380 if (sd->pty->cb.set_title.func) 386 if (sd->pty->cb.set_title.func)
381 sd->pty->cb.set_title.func(sd->pty->cb.set_title.data); 387 sd->pty->cb.set_title.func(sd->pty->cb.set_title.data);
382} 388}