diff options
author | wm4 <wm4@nowhere> | 2014-10-08 15:03:48 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-08 15:03:48 +0200 |
commit | 06ecf54fdfe5732bac37111753a0e2e3f40ca7ae (patch) | |
tree | 211ee37742bcf0554ddada6f4a5f589227f2c026 /common | |
parent | 0ec5d35d57b57c68e93fc69f5fde9bbf3e19f50a (diff) | |
download | mpv-06ecf54fdfe5732bac37111753a0e2e3f40ca7ae.tar.bz2 mpv-06ecf54fdfe5732bac37111753a0e2e3f40ca7ae.tar.xz |
msg: fix unwanted blank lines
Was broken in a commit earlier this day.
Diffstat (limited to 'common')
-rw-r--r-- | common/msg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/msg.c b/common/msg.c index 9ca7da9479..5beb663c9c 100644 --- a/common/msg.c +++ b/common/msg.c @@ -158,6 +158,9 @@ static void prepare_status_line(struct mp_log_root *root, char *new_status) } size_t old_lines = root->status_lines; + if (!new_status[0] && old_lines == 0) + return; // nothing to clear + size_t clear_lines = MPMIN(MPMAX(new_lines, old_lines), root->blank_lines); // clear the status line itself @@ -366,7 +369,6 @@ void mp_msg_va(struct mp_log *log, int lev, const char *format, va_list va) } print_terminal_line(log, lev, text); } - root->buffer[0] = '\0'; } else { int leftover = strlen(text); memmove(root->buffer, text, leftover + 1); |