From: Po Lu Date: Fri, 4 Mar 2022 12:37:50 +0000 (+0800) Subject: Fix some errors in stretch glyphs code on PGTK X-Git-Tag: emacs-29.0.90~2021 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f685bcb65dbb6eb49d03fb1f420e16869c0224de;p=emacs.git Fix some errors in stretch glyphs code on PGTK * src/pgtkterm.c (x_draw_stretch_glyph_string): Remove unnecessary code. Reported by Eli Zaretskii . --- diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 41e2f0ded0e..abcf18e11df 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -2373,27 +2373,16 @@ x_draw_stretch_glyph_string (struct glyph_string *s) else if (!s->background_filled_p) { int background_width = s->background_width; - int x = s->x, text_left_x = window_box_left_offset (s->w, TEXT_AREA); + int x = s->x, text_left_x = window_box_left (s->w, TEXT_AREA); /* Don't draw into left fringe or scrollbar area except for - header line and mode line. */ - if (x < text_left_x && !s->row->mode_line_p) + header line and mode line. */ + if (s->area == TEXT_AREA + && x < text_left_x && !s->row->mode_line_p) { - int background_width = s->background_width; - int x = s->x, text_left_x = window_box_left (s->w, TEXT_AREA); - - /* Don't draw into left fringe or scrollbar area except for - header line and mode line. */ - if (s->area == TEXT_AREA - && x < text_left_x && !s->row->mode_line_p) - { - background_width -= text_left_x - x; - x = text_left_x; - } - if (background_width > 0) - x_draw_glyph_string_bg_rect (s, x, s->y, background_width, s->height); + background_width -= text_left_x - x; + x = text_left_x; } - if (background_width > 0) x_draw_glyph_string_bg_rect (s, x, s->y, background_width, s->height); }