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



commit 441ea0ed2c06bfe716c390c825031024eee065ee
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

 src/ring.cc | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/ring.cc b/src/ring.cc
index fc78ce53..731b1bc2 100644
--- a/src/ring.cc
+++ b/src/ring.cc
@@ -489,6 +489,10 @@ Ring::thaw_row(row_t position,
                        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 != nullptr)


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