[vte/wip/egmont/bidi: 78/83] fix empty rtl lines



commit 52b10058a9a9b0a2415ec098c1bf27a244eb3453
Author: Egmont Koblinger <egmont gmail com>
Date:   Fri Dec 7 13:28:17 2018 +0100

    fix empty rtl lines

 src/bidi.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/bidi.cc b/src/bidi.cc
index 9646fd17..2bf6c320 100644
--- a/src/bidi.cc
+++ b/src/bidi.cc
@@ -362,7 +362,7 @@ vte::grid::row_t RingView::paragraph(vte::grid::row_t row)
         /* For convenience, from now on this variable contains the resolved (i.e. possibly autodetected) 
value. */
         rtl = (pbase_dir == FRIBIDI_PAR_RTL || pbase_dir == FRIBIDI_PAR_WRTL);
 
-        if (level == 1 || (rtl && level == 2)) {
+        if ((!rtl && level == 1) || (rtl && level == 2)) {
                 /* Fast shortcut for LTR-only and RTL-only paragraphs. */
                 return explicit_paragraph (row_orig, rtl);
         }
@@ -426,7 +426,7 @@ vte::grid::row_t RingView::paragraph(vte::grid::row_t row)
                         goto next_line;
                 }
 
-                if (level == 1 || (rtl && level == 2)) {
+                if ((!rtl && level == 1) || (rtl && level == 2)) {
                         /* Fast shortcut for LTR-only and RTL-only lines. */
                         explicit_line (row, rtl);
                         bidirow->m_has_foreign = true;


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