From: Daniel Hahler <[email protected]>
This keeps the existing font when `rxvt_term::scr_swap_overlay` is used,
instead of setting it anew.
While this appears to be good in general, it is important for when the
font has been explicitly set to match the previous one, like I am doing
for spaces in my wide-glyphs patchset.
---
src/screen.C | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/screen.C b/src/screen.C
index f3c6d576..85014e40 100644
--- a/src/screen.C
+++ b/src/screen.C
@@ -3598,16 +3598,17 @@ rxvt_term::scr_overlay_new (int x, int y, int w, int h)
NOTHROW
t0 = 0x255a, t1 = 0x2550, t2 = 0x255d;
*tp++ = t0;
- *rp++ = r;
+ *rp++ = SET_FONT (r, FONTSET (r)->find_font (t0));
+ rend_t r_t1 = SET_FONT (r, FONTSET (r)->find_font (t1));
for (x = w - 2; x > 0; --x)
{
*tp++ = t1;
- *rp++ = r;
+ *rp++ = r_t1;
}
*tp = t2;
- *rp = r;
+ *rp = SET_FONT (r, FONTSET (r)->find_font (t2));
}
}
@@ -3638,7 +3639,7 @@ rxvt_term::scr_overlay_set (int x, int y, text_t text,
rend_t rend) NOTHROW
x++, y++;
ov.text[y][x] = text;
- ov.rend[y][x] = rend;
+ ov.rend[y][x] = SET_FONT (rend, FONTSET (rend)->find_font (text));
}
void
@@ -3687,7 +3688,7 @@ rxvt_term::scr_swap_overlay () NOTHROW
for (int x = ov.w; x--; )
{
text_t t = *t1; *t1++ = *t2; *t2++ = t;
- rend_t r = *r1; *r1++ = *r2; *r2++ = SET_FONT (r, FONTSET
(r)->find_font (t));
+ rend_t r = *r1; *r1++ = *r2; *r2++ = r;
}
}
}
--
2.15.1
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/rxvt-unicode