aboutsummaryrefslogtreecommitdiff
path: root/format-draw.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-05-01 17:01:36 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-05-01 17:01:36 +0100
commit8110c7a25f257b13f92f34559efedba204e6ea98 (patch)
tree1a27040ddeb828a865b28323ee4516f053292591 /format-draw.c
parentdbebdb2d364feea4df958528ee1dcacbb9933e37 (diff)
downloadrtmux-8110c7a25f257b13f92f34559efedba204e6ea98.tar.gz
rtmux-8110c7a25f257b13f92f34559efedba204e6ea98.tar.bz2
rtmux-8110c7a25f257b13f92f34559efedba204e6ea98.zip
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 'format-draw.c')
-rw-r--r--format-draw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/format-draw.c b/format-draw.c
index 4a4fc6bc..3751082e 100644
--- a/format-draw.c
+++ b/format-draw.c
@@ -242,7 +242,7 @@ format_draw_left(struct screen_write_ctx *octx, u_int available, u_int ocx,
/* If there is no list left, pass off to the no list function. */
if (width_list == 0) {
- screen_write_start(&ctx, NULL, left);
+ screen_write_start(&ctx, left);
screen_write_fast_copy(&ctx, after, 0, 0, width_after, 1);
screen_write_stop(&ctx);
@@ -334,7 +334,7 @@ format_draw_centre(struct screen_write_ctx *octx, u_int available, u_int ocx,
/* If there is no list left, pass off to the no list function. */
if (width_list == 0) {
- screen_write_start(&ctx, NULL, centre);
+ screen_write_start(&ctx, centre);
screen_write_fast_copy(&ctx, after, 0, 0, width_after, 1);
screen_write_stop(&ctx);
@@ -431,7 +431,7 @@ format_draw_right(struct screen_write_ctx *octx, u_int available, u_int ocx,
/* If there is no list left, pass off to the no list function. */
if (width_list == 0) {
- screen_write_start(&ctx, NULL, right);
+ screen_write_start(&ctx, right);
screen_write_fast_copy(&ctx, after, 0, 0, width_after, 1);
screen_write_stop(&ctx);
@@ -536,7 +536,7 @@ format_draw(struct screen_write_ctx *octx, const struct grid_cell *base,
*/
for (i = 0; i < TOTAL; i++) {
screen_init(&s[i], size, 1, 0);
- screen_write_start(&ctx[i], NULL, &s[i]);
+ screen_write_start(&ctx[i], &s[i]);
screen_write_clearendofline(&ctx[i], current_default.bg);
width[i] = 0;
}