From 4d06a9faffff4738345b688ab6e7354ec975ae8d Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 27 Aug 2023 02:19:46 +0000 Subject: [PATCH] Correct display of stretch glyphs within hscrolled windows * src/haikuterm.c (haiku_draw_glyphless_glyph_string_foreground): Make char2b static, stifling a GCC warning. (haiku_draw_stretch_glyph_string): Use computed X if s->x is outside the confines of the text area. --- src/haikuterm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/haikuterm.c b/src/haikuterm.c index 70984936bf9..b1a016b49a9 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -1219,7 +1219,7 @@ static void haiku_draw_glyphless_glyph_string_foreground (struct glyph_string *s) { struct glyph *glyph = s->first_glyph; - unsigned char2b[8]; + static unsigned char2b[8]; int x, i, j; struct face *face = s->face; unsigned long color; @@ -1399,7 +1399,7 @@ haiku_draw_stretch_glyph_string (struct glyph_string *s) } if (background_width > 0) - haiku_draw_background_rect (s, s->face, s->x, s->y, + haiku_draw_background_rect (s, s->face, x, s->y, background_width, s->height); } s->background_filled_p = 1; -- 2.39.5