summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2007-08-07 15:55:37 +0000
committerChong Yidong <cyd@stupidchicken.com>2007-08-07 15:55:37 +0000
commit26b9af50e64e00c230142d9876d8f670dfe2cf7b (patch)
treef8c431c610c7fa82cedab253346711c484fb3896
parentae4943506e100e2ee63c50b914d91070f59917e3 (diff)
downloademacs-26b9af50e64e00c230142d9876d8f670dfe2cf7b.tar.gz
(move_it_by_lines): Remove incorrect optimization.
-rw-r--r--src/xdisp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index a565c43223d..b1a837b799a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -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);