Fix cursor movement in R2L text within L2R paragraphs.
authorEli Zaretskii <eliz@gnu.org>
Wed, 24 Aug 2011 15:51:56 +0000 (18:51 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 24 Aug 2011 15:51:56 +0000 (18:51 +0300)
commit8610fe8b84e22f5d962f5e480001748a6687a3b2
tree55985245e55238ddccc8d8994fb3a78a83cadba0
parent5980d4c6db923da523fbb0e2fb44ecd68b13c53d
Fix cursor movement in R2L text within L2R paragraphs.

 src/xdisp.c (set_cursor_from_row): Consider candidate row a win if its
 glyph represents a newline and point is on that newline.  Fixes cursor
 positioning on the newline at EOL of R2L text within L2R
 paragraph, and vice versa.
 (try_cursor_movement): Check continued rows, in addition to
 continuation rows.  Fixes unwarranted scroll when point enters a
 continued line of R2L text within an L2R paragraph, or vice versa.
 (cursor_row_p): Consider the case of point being equal to
 MATRIX_ROW_END_CHARPOS.  Prevents cursor being stuck when moving
 from the end of a short line to the beginning of a continued line
 of R2L text within L2R paragraph.
 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
 composed characters.
src/ChangeLog
src/xdisp.c