diff options
| author | Chong Yidong | 2007-08-07 15:55:37 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-08-07 15:55:37 +0000 |
| commit | 26b9af50e64e00c230142d9876d8f670dfe2cf7b (patch) | |
| tree | f8c431c610c7fa82cedab253346711c484fb3896 /src | |
| parent | ae4943506e100e2ee63c50b914d91070f59917e3 (diff) | |
| download | emacs-26b9af50e64e00c230142d9876d8f670dfe2cf7b.tar.gz emacs-26b9af50e64e00c230142d9876d8f670dfe2cf7b.zip | |
(move_it_by_lines): Remove incorrect optimization.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 10 |
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) | |||
| 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); |