]> git.eshelyaron.com Git - emacs.git/commitdiff
Simplify Haiku underline code
authorPo Lu <luangruo@yahoo.com>
Wed, 26 Jan 2022 05:09:09 +0000 (05:09 +0000)
committerPo Lu <luangruo@yahoo.com>
Wed, 26 Jan 2022 05:09:09 +0000 (05:09 +0000)
* src/haikuterm.c (haiku_draw_text_decoration): Remove code left
over from when mouse face had to be set manually.

src/haikuterm.c

index e7d596cec3d76e98bac4d2346085e6a9361eba6b..90d6f926c8218b05904bf644d79f07aa2770d549 100644 (file)
@@ -632,20 +632,12 @@ haiku_draw_text_decoration (struct glyph_string *s, struct face *face,
              && (s->prev->face->underline_pixels_above_descent_line
                  == s->face->underline_pixels_above_descent_line))
            {
-             struct face *prev_face = s->prev->face;
-
-             if (prev_face && prev_face->underline == FACE_UNDER_LINE)
-               {
-                 /* We use the same underline style as the previous one.  */
-                 thickness = s->prev->underline_thickness;
-                 position = s->prev->underline_position;
-               }
-             else
-               goto calculate_underline_metrics;
+             /* We use the same underline style as the previous one.  */
+             thickness = s->prev->underline_thickness;
+             position = s->prev->underline_position;
            }
          else
            {
-           calculate_underline_metrics:;
              struct font *font = font_for_underline_metrics (s);
              unsigned long minimum_offset;
              bool underline_at_descent_line;