]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix some errors in stretch glyphs code on PGTK
authorPo Lu <luangruo@yahoo.com>
Fri, 4 Mar 2022 12:37:50 +0000 (20:37 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 4 Mar 2022 12:39:31 +0000 (20:39 +0800)
* src/pgtkterm.c (x_draw_stretch_glyph_string): Remove
unnecessary code.  Reported by Eli Zaretskii <eliz@gnu.org>.

src/pgtkterm.c

index 41e2f0ded0e302732e117cd9f2c8f5cb779383ba..abcf18e11dfd310a57697bb7ab552ccdffa8f08a 100644 (file)
@@ -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);
     }