emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f685bcb65d: Fix some errors in stretch glyphs code on PGTK


From: Po Lu
Subject: master f685bcb65d: Fix some errors in stretch glyphs code on PGTK
Date: Fri, 4 Mar 2022 07:39:42 -0500 (EST)

branch: master
commit f685bcb65dbb6eb49d03fb1f420e16869c0224de
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix some errors in stretch glyphs code on PGTK
    
    * src/pgtkterm.c (x_draw_stretch_glyph_string): Remove
    unnecessary code.  Reported by Eli Zaretskii <eliz@gnu.org>.
---
 src/pgtkterm.c | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 41e2f0ded0..abcf18e11d 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);
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]