[vte/wip/egmont/bidi: 42/73] fribidi macro
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/wip/egmont/bidi: 42/73] fribidi macro
- Date: Sun, 23 Sep 2018 11:03:29 +0000 (UTC)
commit 4563cba85bf4147fea8c96540c0ce9596272dbeb
Author: Egmont Koblinger <egmont gmail com>
Date: Mon Aug 27 22:51:28 2018 +0200
fribidi macro
src/bidi.cc | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/bidi.cc b/src/bidi.cc
index 58afff6a..de9f9c8a 100644
--- a/src/bidi.cc
+++ b/src/bidi.cc
@@ -417,15 +417,7 @@ long RingView::paragraph(long row)
cell = _vte_row_data_get (row_data, tl);
g_assert (!cell->attr.fragment());
g_assert (cell->attr.columns() > 0);
- if (fribidi_levels[fl] % 2 == 0) {
- /* LTR character directionality. */
- for (col = 0; col < cell->attr.columns(); col++) {
- map[tv].vis2log = tl;
- map[tv].vis_rtl = FALSE;
- tv++;
- tl++;
- }
- } else {
+ if (FRIBIDI_LEVEL_IS_RTL(fribidi_levels[fl])) {
/* RTL character directionality. Map fragments in reverse order. */
for (col = 0; col < cell->attr.columns(); col++) {
map[tv + col].vis2log = tl + cell->attr.columns() - 1 - col;
@@ -433,6 +425,14 @@ long RingView::paragraph(long row)
}
tv += cell->attr.columns();
tl += cell->attr.columns();
+ } else {
+ /* LTR character directionality. */
+ for (col = 0; col < cell->attr.columns(); col++) {
+ map[tv].vis2log = tl;
+ map[tv].vis_rtl = FALSE;
+ tv++;
+ tl++;
+ }
}
}
if (!rtl) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]