summaryrefslogtreecommitdiffstats
path: root/cmd-display-panes.c
diff options
context:
space:
mode:
authornicm <nicm>2020-05-16 15:34:08 +0000
committernicm <nicm>2020-05-16 15:34:08 +0000
commit9605b080f6c942ff2e51a2ba538cccc91c91c161 (patch)
treea2cb5c229410d3c8b749a1e0da2716494c08445c /cmd-display-panes.c
parent379ca54c80837d09dff53ffa7b9ea3b80d87096b (diff)
Do not hoke into struct window_pane from the tty code and instead set
everything up in tty_ctx. Provide a way to initialize the tty_ctx from a callback and use it to let popups draw directly through input_parse in the same way as panes do, rather than forcing a full redraw on every change.
Diffstat (limited to 'cmd-display-panes.c')
-rw-r--r--cmd-display-panes.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/cmd-display-panes.c b/cmd-display-panes.c
index 0f12b14b..a13a06ae 100644
--- a/cmd-display-panes.c
+++ b/cmd-display-panes.c
@@ -131,9 +131,7 @@ cmd_display_panes_draw_pane(struct screen_redraw_ctx *ctx,
gc.bg = active_colour;
else
gc.bg = colour;
- gc.flags |= GRID_FLAG_NOPALETTE;
-
- tty_attributes(tty, &gc, wp);
+ tty_attributes(tty, &gc, &grid_default_cell, NULL);
for (ptr = buf; *ptr != '\0'; ptr++) {
if (*ptr < '0' || *ptr > '9')
continue;
@@ -160,9 +158,7 @@ draw_text:
gc.fg = active_colour;
else
gc.fg = colour;
- gc.flags |= GRID_FLAG_NOPALETTE;
-
- tty_attributes(tty, &gc, wp);
+ tty_attributes(tty, &gc, &grid_default_cell, NULL);
tty_puts(tty, buf);
tty_cursor(tty, 0, 0);