# HG changeset patch # User Eli Zaretskii # Date 1272224011 -10800 # Node ID 65bda6b7d8b9781e3ac42d03787e7abbd6362a80 # Parent a9a653a56eef91d27a73ce68ca7535aea4e77567 Start fixing cursor positioning in bidi buffers with display properties. xdisp.c (set_cursor_from_row): Don't return zero if cursor was found by `cursor' property of a display string. (display_line): Preserve overlay and string info in row->end. diff -r a9a653a56eef -r 65bda6b7d8b9 src/ChangeLog --- a/src/ChangeLog Sun Apr 25 19:55:59 2010 +0300 +++ b/src/ChangeLog Sun Apr 25 22:33:31 2010 +0300 @@ -1,3 +1,9 @@ +2010-04-25 Eli Zaretskii + + * xdisp.c (set_cursor_from_row): Don't return zero if cursor was + found by `cursor' property of a display string. + (display_line): Preserve overlay and string info in row->end. + 2010-04-25 Eli Zaretskii * xdisp.c (display_line): Fix crash with bidi display on the last diff -r a9a653a56eef -r 65bda6b7d8b9 src/xdisp.c --- a/src/xdisp.c Sun Apr 25 19:55:59 2010 +0300 +++ b/src/xdisp.c Sun Apr 25 22:33:31 2010 +0300 @@ -13055,7 +13055,8 @@ /* If we reached the end of the line, and END was from a string, the cursor is not on this line. */ - if (glyph == end + if (cursor == NULL + && glyph == end && STRINGP ((glyph - incr)->object) && row->continued_p) return 0; @@ -17969,7 +17970,6 @@ in the logical order, unless we are at ZV. */ if (row->ends_at_zv_p) { - row_end = row->end = it->current; if (!row->used[TEXT_AREA]) { row->start.pos.charpos = row_end.pos.charpos; @@ -18019,6 +18019,9 @@ it->eol_pos.charpos = it->eol_pos.bytepos = 0; } *it = save_it; + row_end.string_pos = it->current.string_pos; + row_end.overlay_string_index = it->current.overlay_string_index; + row_end.dpvec_index = it->current.dpvec_index; row->end = row_end; } }