emacs-diffs
[Top][All Lists]
Advanced

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

master 76fa7f1f2fb: Fix display of reordered Arabic text


From: Eli Zaretskii
Subject: master 76fa7f1f2fb: Fix display of reordered Arabic text
Date: Mon, 26 Feb 2024 12:27:23 -0500 (EST)

branch: master
commit 76fa7f1f2fb7fbc3dcbd0be7928d0ec112e532e7
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix display of reordered Arabic text
    
    * src/xdisp.c (compute_stop_pos): Fix a year-old thinko in
    handling auto-composed characters.  It was introduced as part
    of solving bug#62780, which optimized the search for composable
    characters.  (Bug#69384)
---
 src/xdisp.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 4d60915f31c..d03769e2a31 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4345,10 +4345,7 @@ compute_stop_pos (struct it *it)
        }
     }
 
-  if (it->cmp_it.id < 0
-      && (STRINGP (it->string)
-         || ((!it->bidi_p || it->bidi_it.scan_dir >= 0)
-             && it->cmp_it.stop_pos <= IT_CHARPOS (*it))))
+  if (it->cmp_it.id < 0)
     {
       ptrdiff_t stoppos = it->end_charpos;
 
@@ -4357,7 +4354,9 @@ compute_stop_pos (struct it *it)
          characters to that position.  */
       if (it->bidi_p && it->bidi_it.scan_dir < 0)
        stoppos = -1;
-      else if (cmp_limit_pos > 0)
+      else if (!STRINGP (it->string)
+              && it->cmp_it.stop_pos <= IT_CHARPOS (*it)
+              && cmp_limit_pos > 0)
        stoppos = cmp_limit_pos;
       /* Force composition_compute_stop_pos avoid the costly search
          for static compositions, since those were already found by



reply via email to

[Prev in Thread] Current Thread [Next in Thread]