diff options
author | wm4 <wm4@nowhere> | 2016-07-15 18:58:36 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-07-15 18:58:36 +0200 |
commit | 831fc4f012b482e98f48dafc16d107e7439ee6e8 (patch) | |
tree | 705ad8b41c1ed909105513e070a519d505ada737 | |
parent | f29bba1123687c3eb601dd0df18d88a3b8a9fb82 (diff) | |
download | mpv-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.c | 2 |
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); |