aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2007-08-07 15:54:27 +0000
committerChong Yidong2007-08-07 15:54:27 +0000
commita19a62aecb21887cbd910cd10662ad017cd84eb8 (patch)
tree4c1ba91019167fc74c905aa8ecf0bb30fc6f2330
parent1cc8a86183de289eb920b8eb6274a00b81d17291 (diff)
downloademacs-a19a62aecb21887cbd910cd10662ad017cd84eb8.tar.gz
emacs-a19a62aecb21887cbd910cd10662ad017cd84eb8.zip
(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 1dd69e34590..a1c027b895e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -7087,18 +7087,22 @@ move_it_by_lines (it, dvpos, need_y_p)
7087{ 7087{
7088 struct position pos; 7088 struct position pos;
7089 7089
7090 if (!FRAME_WINDOW_P (it->f)) 7090 /* The commented-out optimization uses vmotion on terminals. This
7091 gives bad results, because elements like it->what, on which
7092 callers such as pos_visible_p rely, aren't updated. */
7093 /* if (!FRAME_WINDOW_P (it->f))
7091 { 7094 {
7092 struct text_pos textpos; 7095 struct text_pos textpos;
7093 7096
7094 /* We can use vmotion on frames without proportional fonts. */
7095 pos = *vmotion (IT_CHARPOS (*it), dvpos, it->w); 7097 pos = *vmotion (IT_CHARPOS (*it), dvpos, it->w);
7096 SET_TEXT_POS (textpos, pos.bufpos, pos.bytepos); 7098 SET_TEXT_POS (textpos, pos.bufpos, pos.bytepos);
7097 reseat (it, textpos, 1); 7099 reseat (it, textpos, 1);
7098 it->vpos += pos.vpos; 7100 it->vpos += pos.vpos;
7099 it->current_y += pos.vpos; 7101 it->current_y += pos.vpos;
7100 } 7102 }
7101 else if (dvpos == 0) 7103 else */
7104
7105 if (dvpos == 0)
7102 { 7106 {
7103 /* DVPOS == 0 means move to the start of the screen line. */ 7107 /* DVPOS == 0 means move to the start of the screen line. */
7104 move_it_vertically_backward (it, 0); 7108 move_it_vertically_backward (it, 0);