summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-07-15 18:58:36 +0200
committerwm4 <wm4@nowhere>2016-07-15 18:58:36 +0200
commit831fc4f012b482e98f48dafc16d107e7439ee6e8 (patch)
tree705ad8b41c1ed909105513e070a519d505ada737
parentf29bba1123687c3eb601dd0df18d88a3b8a9fb82 (diff)
downloadmpv-831fc4f012b482e98f48dafc16d107e7439ee6e8.tar.bz2
mpv-831fc4f012b482e98f48dafc16d107e7439ee6e8.tar.xz
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.
-rw-r--r--player/osd.c2
1 files changed, 1 insertions, 1 deletions
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);