comparison src/xdisp.c @ 109990:7ab569e9f738

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:47:34 +0900
parents 4083ea4ca585
children 0dcf6ddbe02b
comparison
equal deleted inserted replaced
109988:ae3fecdc3276 109990:7ab569e9f738
3175 static void 3175 static void
3176 compute_stop_pos (struct it *it) 3176 compute_stop_pos (struct it *it)
3177 { 3177 {
3178 register INTERVAL iv, next_iv; 3178 register INTERVAL iv, next_iv;
3179 Lisp_Object object, limit, position; 3179 Lisp_Object object, limit, position;
3180 EMACS_INT charpos, bytepos; 3180 EMACS_INT charpos, bytepos, stoppos;
3181 3181
3182 /* If nowhere else, stop at the end. */ 3182 /* If nowhere else, stop at the end. */
3183 it->stop_charpos = it->end_charpos; 3183 it->stop_charpos = it->end_charpos;
3184 3184
3185 if (STRINGP (it->string)) 3185 if (STRINGP (it->string))
3265 /* Text properties change in next_iv. */ 3265 /* Text properties change in next_iv. */
3266 it->stop_charpos = min (it->stop_charpos, next_iv->position); 3266 it->stop_charpos = min (it->stop_charpos, next_iv->position);
3267 } 3267 }
3268 } 3268 }
3269 3269
3270 if (it->bidi_p && it->bidi_it.scan_dir < 0)
3271 stoppos = -1;
3272 else
3273 stoppos = it->stop_charpos;
3270 composition_compute_stop_pos (&it->cmp_it, charpos, bytepos, 3274 composition_compute_stop_pos (&it->cmp_it, charpos, bytepos,
3271 it->stop_charpos, it->string); 3275 stoppos, it->string);
3272 3276
3273 xassert (STRINGP (it->string) 3277 xassert (STRINGP (it->string)
3274 || (it->stop_charpos >= BEGV 3278 || (it->stop_charpos >= BEGV
3275 && it->stop_charpos >= IT_CHARPOS (*it))); 3279 && it->stop_charpos >= IT_CHARPOS (*it)));
3276 } 3280 }