mirror of
https://github.com/tmux/tmux.git
synced 2026-02-13 09:19:17 +00:00
Check log level before log_debug in tty_draw_line, from Conor Taylor in
GitHub issue 4848.
This commit is contained in:
10
tty-draw.c
10
tty-draw.c
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user