Skip to content

Commit

Permalink
msg: strip control char also when not printing to terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper93 committed Oct 11, 2024
1 parent 65c81c3 commit 39d3591
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,11 @@ static void write_term_msg(struct mp_log *log, int lev, bstr text, bstr *out)
break;
}

bool clip = bstr_eatstart0(&line, TERM_MSG_0);
if (print_term) {
int 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)
? 1 : (line_w + term_w - 1) / term_w;
}
Expand Down

0 comments on commit 39d3591

Please sign in to comment.