summaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-02-03 14:01:25 +0000
committerThomas Adam <thomas@xteddy.org>2020-02-03 14:01:25 +0000
commit19d5f4a0bd0126cb9de0129ead81d67abd917d55 (patch)
tree63692157507e0bf62f4aa6396096e75c4a3a3001 /screen.c
parent6f0241e64522d751ccd19cb70b23e8bf56f306c6 (diff)
parent265164d251f427bf9275c355a4f205c781d70b20 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/screen.c b/screen.c
index 405932ef..6b1f69af 100644
--- a/screen.c
+++ b/screen.c
@@ -151,11 +151,16 @@ screen_set_cursor_colour(struct screen *s, const char *colour)
}
/* Set screen title. */
-void
+int
screen_set_title(struct screen *s, const char *title)
{
+ char *cp;
+
+ if (!utf8_isvalid(title))
+ return (0);
free(s->title);
- utf8_stravis(&s->title, title, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL);
+ s->title = xstrdup(title);
+ return (1);
}
/* Set screen path. */