[vte/vte-0-52] ring: Fix thawing combining accents over a double-wide character



commit 90006b3455228e2fc66b01c5065449a381369991
Author: Akira Nakajima <argebam2a yahoo co jp>
Date:   Fri Oct 19 22:12:48 2018 +0200

    ring: Fix thawing combining accents over a double-wide character
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795192
    (cherry picked from commit 441ea0ed2c06bfe716c390c825031024eee065ee)

 src/ring.cc | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/ring.cc b/src/ring.cc
index 2dc5a528..d03b1559 100644
--- a/src/ring.cc
+++ b/src/ring.cc
@@ -527,6 +527,10 @@ _vte_ring_thaw_row (VteRing *ring, gulong position, VteRowData *row, gboolean do
                        if (G_LIKELY (row->len)) {
                                /* Combine it */
                                row->cells[row->len - 1].c = _vte_unistr_append_unichar (row->cells[row->len 
- 1].c, cell.c);
+                                /* Spread it to all the previous cells of a potentially multicell character 
*/
+                                for (int i = row->len - 1; i >= 1 && row->cells[i].attr.fragment(); i--) {
+                                        row->cells[i - 1].c = row->cells[i].c;
+                                }
                        } else {
                                cell.attr.set_columns(1);
                                 if (row->len == hyperlink_column && hyperlink != NULL)


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