Check log level before log_debug in tty_draw_line, from Conor Taylor in

GitHub issue 4848.
This commit is contained in:
nicm
2026-02-10 08:31:45 +00:00
parent b7939eb266
commit d8794e2b30

View File

@@ -262,10 +262,12 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int px, u_int py, u_int nx,
else
next_state = TTY_DRAW_LINE_NEW1;
}
log_debug("%s: cell %u empty %u, bg %u; state: current %s, "
"next %s", __func__, px + i, empty, gcp->bg,
tty_draw_line_states[current_state],
tty_draw_line_states[next_state]);
if (log_get_level() != 0) {
log_debug("%s: cell %u empty %u, bg %u; state: "
"current %s, next %s", __func__, px + i, empty,
gcp->bg, tty_draw_line_states[current_state],
tty_draw_line_states[next_state]);
}
/* If the state has changed, flush any collected data. */
if (next_state != current_state) {