mirror of https://github.com/mpv-player/mpv
msg: don't clear the status line if new and previous status was empty
This avoids stray newlines when: 1. Some (non-status line) text was output 2. Then an empty status line is output According to the logic, 2. should print an empty line to show the blank status line. Don't do that, and instead output nothing in this case. This caused problems with mpv_identify.sh, and also looked ugly when using --quiet.
This commit is contained in:
parent
8e61e9ed6e
commit
5035bccb41
|
@ -210,6 +210,9 @@ static void print_msg_on_terminal(struct mp_log *log, int lev, char *text)
|
|||
// skip status line output if stderr is a tty but in background
|
||||
if (terminal_in_background())
|
||||
return;
|
||||
// don't clear if we don't have to
|
||||
if (!text[0] && !root->status_lines)
|
||||
return;
|
||||
if (root->termosd) {
|
||||
prepare_status_line(root, text);
|
||||
terminate = "\r";
|
||||
|
|
Loading…
Reference in New Issue