summaryrefslogtreecommitdiffstats
path: root/player/osd.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/osd.c')
-rw-r--r--player/osd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/player/osd.c b/player/osd.c
index 69b8dbb8b1..aa4d7243cc 100644
--- a/player/osd.c
+++ b/player/osd.c
@@ -129,6 +129,12 @@ static void term_osd_set_status(struct MPContext *mpctx, const char *text)
{
talloc_free(mpctx->term_osd_status);
mpctx->term_osd_status = talloc_strdup(mpctx, text);
+
+ int w = 80, h = 24;
+ terminal_get_size(&w, &h);
+ if (strlen(mpctx->term_osd_status) > w)
+ mpctx->term_osd_status[w] = '\0';
+
term_osd_update(mpctx);
}