mirror of https://github.com/mpv-player/mpv
msg: strip control char also when not printing to terminal
This commit is contained in:
parent
65c81c3a39
commit
39d3591bb2
|
@ -521,10 +521,11 @@ static void write_term_msg(struct mp_log *log, int lev, bstr text, bstr *out)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool clip = bstr_eatstart0(&line, TERM_MSG_0);
|
||||||
if (print_term) {
|
if (print_term) {
|
||||||
int line_w;
|
int line_w;
|
||||||
append_terminal_line(log, lev, line, &root->term_msg_tmp, &line_w,
|
append_terminal_line(log, lev, line, &root->term_msg_tmp, &line_w,
|
||||||
bstr_eatstart0(&line, TERM_MSG_0) ? term_w : INT_MAX);
|
clip ? term_w : INT_MAX);
|
||||||
term_msg_lines += (!line_w || !term_w)
|
term_msg_lines += (!line_w || !term_w)
|
||||||
? 1 : (line_w + term_w - 1) / term_w;
|
? 1 : (line_w + term_w - 1) / term_w;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue