From: Eli Zaretskii Date: Sun, 25 Apr 2010 19:33:31 +0000 (+0300) Subject: Start fixing cursor positioning in bidi buffers with display properties. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~319^2~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7482731ab522e6c0667fcf1b60bc9b5c1ba6ffca;p=emacs.git 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 --git a/src/ChangeLog b/src/ChangeLog index 58fdad2d1d2..9cabe8de38b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 --git a/src/xdisp.c b/src/xdisp.c index 4834b61a626..d491d5a9aeb 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13055,7 +13055,8 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) /* 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 @@ display_line (it) 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 @@ display_line (it) 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; } }