changeset 78444:88c174cb1507

(move_it_by_lines): Remove incorrect optimization.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 07 Aug 2007 15:54:27 +0000
parents 52f4ec6b316f
children d92fa7306fd1
files src/xdisp.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Tue Aug 07 15:54:16 2007 +0000
+++ b/src/xdisp.c	Tue Aug 07 15:54:27 2007 +0000
@@ -7087,18 +7087,22 @@
 {
   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);