changeset 108194:65bda6b7d8b9

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.
author Eli Zaretskii <eliz@gnu.org>
date Sun, 25 Apr 2010 22:33:31 +0300
parents a9a653a56eef
children d3d8bc38d005
files src/ChangeLog src/xdisp.c
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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  <eliz@gnu.org>
+
+	* 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  <eliz@gnu.org>
 
 	* xdisp.c (display_line): Fix crash with bidi display on the last
--- 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;
 	}
     }