changeset 109991:7a475b5bbabe

xdisp.c (compute_stop_pos): Pay attention to bidi scan direction on calling composition_compute_stop_pos.
author Kenichi Handa <handa@m17n.org>
date Thu, 26 Aug 2010 09:51:37 +0900
parents b9af37ce659c (current diff) 7ab569e9f738 (diff)
children 640cdeb464c1 47e9b8a2298c
files
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Aug 26 09:29:02 2010 +0900
+++ b/src/ChangeLog	Thu Aug 26 09:51:37 2010 +0900
@@ -1,3 +1,8 @@
+2010-08-26  Kenichi Handa  <handa@m17n.org>
+
+	* xdisp.c (compute_stop_pos): Pay attention to bidi scan direction
+	on calling composition_compute_stop_pos.
+
 2010-08-25  Kenichi Handa  <handa@m17n.org>
 
 	* fontset.c (reorder_font_vector): Prefer a font-spec specifying
--- a/src/xdisp.c	Thu Aug 26 09:29:02 2010 +0900
+++ b/src/xdisp.c	Thu Aug 26 09:51:37 2010 +0900
@@ -3177,7 +3177,7 @@
 {
   register INTERVAL iv, next_iv;
   Lisp_Object object, limit, position;
-  EMACS_INT charpos, bytepos;
+  EMACS_INT charpos, bytepos, stoppos;
 
   /* If nowhere else, stop at the end.  */
   it->stop_charpos = it->end_charpos;
@@ -3267,8 +3267,12 @@
 	}
     }
 
+  if (it->bidi_p && it->bidi_it.scan_dir < 0)
+    stoppos = -1;
+  else
+    stoppos = it->stop_charpos;
   composition_compute_stop_pos (&it->cmp_it, charpos, bytepos,
-				it->stop_charpos, it->string);
+				stoppos, it->string);
 
   xassert (STRINGP (it->string)
 	   || (it->stop_charpos >= BEGV