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.
This commit is contained in:
wm4 2016-07-15 18:58:36 +02:00
parent f29bba1123
commit 831fc4f012
1 changed files with 1 additions and 1 deletions

View File

@ -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);