[vte/wip/egmont/bidi: 40/75] fix cjk positioning



commit 47d5edfaacba21448ebc8c2e24969651a8cfd7f2
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 96db6d57..7d33fab5 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -9177,7 +9177,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);
@@ -9252,7 +9252,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]