changeset 98422:7ca03e7c52c8

(move_it_to): Don't advance the iterator if the last tab in a continued line coincides with a line beginning.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 30 Sep 2008 16:54:41 +0000
parents dc319ea42ea9
children d7c217a492c9
files src/xdisp.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Tue Sep 30 16:54:25 2008 +0000
+++ b/src/xdisp.c	Tue Sep 30 16:54:41 2008 +0000
@@ -7258,11 +7258,12 @@
 	    {
 	      it->continuation_lines_width += it->last_visible_x;
 	      /* When moving by vpos, ensure that the iterator really
-		 advances to the next line (bug#847).  Fixme: do we
-		 need to do this in other circumstances?  */
-	      if ((op & MOVE_TO_VPOS)
-		  && !(op & (MOVE_TO_X | MOVE_TO_POS)))
-		set_iterator_to_next (it, 0);
+		 advances to the next line (bug#847, bug#969).  Fixme:
+		 do we need to do this in other circumstances?  */
+	      if (it->current_x != it->last_visible_x
+		  && (op & MOVE_TO_VPOS)
+	      	  && !(op & (MOVE_TO_X | MOVE_TO_POS)))
+	      	set_iterator_to_next (it, 0);
 	    }
 	  else
 	    it->continuation_lines_width += it->current_x;