From 831fc4f012b482e98f48dafc16d107e7439ee6e8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 15 Jul 2016 18:58:36 +0200 Subject: player: do not cut off terminal status line if it contains newlines Just a heuristic to preserve the status line in odd corner cases. Probably a crap idea. Fixes #3340. --- player/osd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/osd.c b/player/osd.c index aa4d7243cc..e2606829be 100644 --- a/player/osd.c +++ b/player/osd.c @@ -132,7 +132,7 @@ static void term_osd_set_status(struct MPContext *mpctx, const char *text) int w = 80, h = 24; terminal_get_size(&w, &h); - if (strlen(mpctx->term_osd_status) > w) + if (strlen(mpctx->term_osd_status) > w && !strchr(mpctx->term_osd_status, '\n')) mpctx->term_osd_status[w] = '\0'; term_osd_update(mpctx); -- cgit v1.2.3