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.
This commit is contained in:
Nicholas Marriott
2020-05-01 17:01:36 +01:00
parent dbebdb2d36
commit 8110c7a25f
15 changed files with 445 additions and 338 deletions

View File

@ -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);