]> git.eshelyaron.com Git - emacs.git/commitdiff
(move_it_by_lines): Remove incorrect optimization.
authorChong Yidong <cyd@stupidchicken.com>
Tue, 7 Aug 2007 15:54:27 +0000 (15:54 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 7 Aug 2007 15:54:27 +0000 (15:54 +0000)
src/xdisp.c

index 1dd69e345905df33c24630d8c7b9071f2abed1a1..a1c027b895e42740ade42056bc0e8cd421330397 100644 (file)
@@ -7087,18 +7087,22 @@ move_it_by_lines (it, dvpos, need_y_p)
 {
   struct position pos;
 
-  if (!FRAME_WINDOW_P (it->f))
+  /* The commented-out optimization uses vmotion on terminals.  This
+     gives bad results, because elements like it->what, on which
+     callers such as pos_visible_p rely, aren't updated. */
+  /*  if (!FRAME_WINDOW_P (it->f))
     {
       struct text_pos textpos;
 
-      /* We can use vmotion on frames without proportional fonts.  */
       pos = *vmotion (IT_CHARPOS (*it), dvpos, it->w);
       SET_TEXT_POS (textpos, pos.bufpos, pos.bytepos);
       reseat (it, textpos, 1);
       it->vpos += pos.vpos;
       it->current_y += pos.vpos;
     }
-  else if (dvpos == 0)
+    else */
+
+  if (dvpos == 0)
     {
       /* DVPOS == 0 means move to the start of the screen line.  */
       move_it_vertically_backward (it, 0);