[vte/wip/egmont/bidi: 49/82] fix cjk positioning



commit 30ce7b5fa4337201ced464fa622f2534075fb526
Author: Egmont Koblinger <egmont gmail com>
Date:   Fri Aug 24 11:38:27 2018 +0200

    fix cjk positioning

 src/vte.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index bb4470c8..19db3056 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -9218,7 +9218,7 @@ Terminal::draw_rows(VteScreen *screen_,
 
                        items[0].c = cell->c;
                        items[0].columns = cell->attr.columns();
-                       items[0].x = start_x + i * column_width;
+                       items[0].x = start_x + (i - (bidimap[i].vis_rtl ? cell->attr.columns() - 1 : 0)) * 
column_width;
                        items[0].y = y;
                        items[0].mirror = bidimap[i].vis_rtl;
                         items[0].box_mirror = !!(row_data->attr.bidi_flags & VTE_BIDI_BOX_MIRROR);
@@ -9293,7 +9293,7 @@ Terminal::draw_rows(VteScreen *screen_,
                                        /* Add this cell to the draw list. */
                                        items[item_count].c = cell->c;
                                        items[item_count].columns = cell->attr.columns();
-                                       items[item_count].x = start_x + j * column_width;
+                                       items[item_count].x = start_x + (j - (bidimap[j].vis_rtl ? 
cell->attr.columns() - 1 : 0)) * column_width;
                                        items[item_count].y = y;
                                         items[item_count].mirror = bidimap[j].vis_rtl;
                                         items[item_count].box_mirror = !!(row_data->attr.bidi_flags & 
VTE_BIDI_BOX_MIRROR);


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