mirror of https://github.com/mpv-player/mpv
msg: skip formatting if there is only control char present
This doesn't change behaviour just skips some redundant code early.
This commit is contained in:
parent
3cf0f8309f
commit
201a39d7fa
|
@ -539,9 +539,10 @@ static void write_term_msg(struct mp_log *log, int lev, bstr text, bstr *out)
|
|||
|
||||
if (lev == MSGL_STATUS) {
|
||||
int line_w = 0;
|
||||
bool clip = bstr_eatstart0(&str, TERM_MSG_0);
|
||||
if (str.len && print_term)
|
||||
append_terminal_line(log, lev, str, &root->term_msg_tmp, &line_w,
|
||||
bstr_eatstart0(&str, TERM_MSG_0) && term_w ? term_w : INT_MAX);
|
||||
clip && term_w ? term_w : INT_MAX);
|
||||
term_msg_lines += !term_w ? (str.len ? 1 : 0)
|
||||
: (line_w + term_w - 1) / term_w;
|
||||
} else if (str.len) {
|
||||
|
|
Loading…
Reference in New Issue