[vte] widget: Fix display glitches around hidden underline



commit c86612919e855025b03afd0189bd5c7e9c04b92b
Author: Egmont Koblinger <egmont gmail com>
Date:   Sat Dec 16 23:31:32 2017 +0100

    widget: Fix display glitches around hidden underline
    
    https://bugzilla.gnome.org/show_bug.cgi?id=791303

 src/vte.cc |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 1b7ed24..82661fa 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -9336,7 +9336,7 @@ VteTerminalPrivate::draw_rows(VteScreen *screen_,
         gboolean bold, nbold, italic, nitalic,
                  hyperlink, nhyperlink, hilite, nhilite,
                 selected, nselected, strikethrough, nstrikethrough,
-                 overline, noverline;
+                 overline, noverline, invisible, ninvisible;
        guint item_count;
        const VteCell *cell;
        VteRowData const* row_data;
@@ -9488,6 +9488,7 @@ VteTerminalPrivate::draw_rows(VteScreen *screen_,
                        underline = cell->attr.underline;
                        strikethrough = cell->attr.strikethrough;
                         overline = cell->attr.overline;
+                        invisible = cell->attr.invisible;
                         hyperlink = (m_allow_hyperlink && cell->attr.hyperlink_idx != 0);
                        bold = cell->attr.bold;
                        italic = cell->attr.italic;
@@ -9514,10 +9515,9 @@ VteTerminalPrivate::draw_rows(VteScreen *screen_,
                                        if (cell == NULL) {
                                                goto fg_next_row;
                                        }
-                                       /* Don't render blank cells or fragments of multicolumn characters
-                                        * which have the same attributes as the initial
-                                        * portions.  Don't render invisible cells */
-                                       if (cell->attr.fragment || cell->attr.invisible) {
+                                        /* Ignore the attributes on a fragment, the attributes
+                                         * of the preceding character cell should apply. */
+                                        if (cell->attr.fragment) {
                                                j++;
                                                continue;
                                        }
@@ -9568,6 +9568,10 @@ VteTerminalPrivate::draw_rows(VteScreen *screen_,
                                         if (nhyperlink != hyperlink) {
                                                 break;
                                         }
+                                        ninvisible = cell->attr.invisible;
+                                        if (ninvisible != invisible) {
+                                                break;
+                                        }
                                        /* Break up matched/not-matched text. */
                                        nhilite = false;
                                         if (cell->attr.hyperlink_idx != 0 && cell->attr.hyperlink_idx == 
m_hyperlink_hover_idx) {


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