From 949cc0e8338e980587006a27b59f21b4e081d08a Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Sat, 21 Mar 2026 09:56:20 -0700 Subject: [PATCH] render margins more often when bleeding --- config.c | 7 ++----- render.c | 7 ++++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/config.c b/config.c index edd6a241..24884246 100644 --- a/config.c +++ b/config.c @@ -2826,11 +2826,8 @@ parse_section_tweak(struct context *ctx) else if (streq(key, "overflowing-glyphs")) return value_to_bool(ctx, &conf->tweak.overflowing_glyphs); - else if (streq(key, "edge-bg-bleed")) { - bool ret = value_to_bool(ctx, &conf->tweak.edge_bg_bleed); - LOG_WARN("edge-bg-bleed: %s", conf->tweak.edge_bg_bleed ? "yes" : "no"); - return ret; - } + else if (streq(key, "edge-bg-bleed")) + return value_to_bool(ctx, &conf->tweak.edge_bg_bleed); else if (streq(key, "damage-whole-window")) return value_to_bool(ctx, &conf->tweak.damage_whole_window); diff --git a/render.c b/render.c index fe6022b1..0d5a3928 100644 --- a/render.c +++ b/render.c @@ -1376,9 +1376,6 @@ static void render_margin_bleed(struct terminal *term, struct buffer *buf, int start_line, int end_line, bool apply_damage) { - LOG_WARN("render_margin_bleed: start_line=%d, end_line=%d, apply_damage=%d", - start_line, end_line, apply_damage); - const bool gamma_correct = wayl_do_linear_blending(term->wl, term->conf); struct grid *grid = term->grid; const int width = term->cell_width; @@ -3804,6 +3801,10 @@ grid_render(struct terminal *term) pixman_region32_union(&buf->dirty[0], &buf->dirty[0], &damage); + /* Re-render margins with edge cell backgrounds after row rendering */ + if (term->conf->tweak.edge_bg_bleed) + render_margin_bleed(term, buf, 0, term->rows, true); + { int box_count = 0; pixman_box32_t *boxes = pixman_region32_rectangles(&damage, &box_count);