=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- src/usr.bin/tmux/screen.c 2019/11/15 11:16:53 1.56 +++ src/usr.bin/tmux/screen.c 2020/02/03 13:46:27 1.57 @@ -1,4 +1,4 @@ -/* $OpenBSD: screen.c,v 1.56 2019/11/15 11:16:53 nicm Exp $ */ +/* $OpenBSD: screen.c,v 1.57 2020/02/03 13:46:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -152,11 +152,16 @@ } /* 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. */