]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix another bug with cursor motion around display properties.
authorEli Zaretskii <eliz@gnu.org>
Thu, 7 Jul 2011 17:48:51 +0000 (20:48 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 7 Jul 2011 17:48:51 +0000 (20:48 +0300)
Still not quite there yet.

 src/xdisp.c (find_row_edges): If ROW->start.pos gives position
 smaller than min_pos, use it as ROW->minpos.  (Bug#7616)

src/ChangeLog
src/xdisp.c

index 55ff323ab57993346342a823dd63e14b9295b490..74a684df45eed514fbf040bf11afc488f6e80aa9 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (find_row_edges): If ROW->start.pos gives position
+       smaller than min_pos, use it as ROW->minpos.  (Bug#7616)
+
 2011-07-05  Eli Zaretskii  <eliz@gnu.org>
 
        * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
@@ -33,7 +38,7 @@
 2011-07-02  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (reseat_1): Call bidi_init_it to resync the bidi
-       iterator with IT's position.
+       iterator with IT's position.  (Bug#7616)
        (handle_stop, back_to_previous_visible_line_start, reseat_1):
        Reset the from_disp_prop_p flag.
 
index 0281370008cf92edf0221dbb754ed77213aaf896..1cc3e2eaadb4d8f0c781c82f3dda637751c048be 100644 (file)
@@ -17976,12 +17976,13 @@ find_row_edges (struct it *it, struct glyph_row *row,
      lines' rows is implemented for bidi-reordered rows.  */
 
   /* ROW->minpos is the value of min_pos, the minimal buffer position
-     we have in ROW.  */
-  if (min_pos <= ZV)
+     we have in ROW, or ROW->start.pos if that is smaller.  */
+  if (min_pos <= ZV && min_pos < row->start.pos.charpos)
     SET_TEXT_POS (row->minpos, min_pos, min_bpos);
   else
-    /* We didn't find _any_ valid buffer positions in any of the
-       glyphs, so we must trust the iterator's computed positions.  */
+    /* We didn't find buffer positions smaller than ROW->start, or
+       didn't find _any_ valid buffer positions in any of the glyphs,
+       so we must trust the iterator's computed positions.  */
       row->minpos = row->start.pos;
   if (max_pos <= 0)
     {