diff options
| author | Eli Zaretskii | 2012-03-02 13:35:51 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-03-02 13:35:51 +0200 |
| commit | de0100f20b41cda924055c3c80e0b85db8386110 (patch) | |
| tree | 83f663fefccd459bd3a52b4530f1500adb0b3f5c /src | |
| parent | d49902e4f2bda52673a39aff00d1eab81312df06 (diff) | |
| download | emacs-de0100f20b41cda924055c3c80e0b85db8386110.tar.gz emacs-de0100f20b41cda924055c3c80e0b85db8386110.zip | |
Fix bug #10902 with cursor positioning at EOB.
src/xdisp.c (try_window_reusing_current_matrix): Don't move cursor
position past the first glyph_row that ends at ZV.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ecfd83eef37..c84854f2827 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-03-02 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (try_window_reusing_current_matrix): Don't move cursor | ||
| 4 | position past the first glyph_row that ends at ZV. (Bug#10902) | ||
| 5 | |||
| 1 | 2012-03-02 Glenn Morris <rgm@gnu.org> | 6 | 2012-03-02 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * buffer.c (buffer-list-update-hook): Doc fix. | 8 | * buffer.c (buffer-list-update-hook): Doc fix. |
diff --git a/src/xdisp.c b/src/xdisp.c index 644658b3136..f98df491f59 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -16322,7 +16322,10 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 16322 | ++first_row_to_display) | 16322 | ++first_row_to_display) |
| 16323 | { | 16323 | { |
| 16324 | if (PT >= MATRIX_ROW_START_CHARPOS (first_row_to_display) | 16324 | if (PT >= MATRIX_ROW_START_CHARPOS (first_row_to_display) |
| 16325 | && PT < MATRIX_ROW_END_CHARPOS (first_row_to_display)) | 16325 | && (PT < MATRIX_ROW_END_CHARPOS (first_row_to_display) |
| 16326 | || (PT == MATRIX_ROW_END_CHARPOS (first_row_to_display) | ||
| 16327 | && first_row_to_display->ends_at_zv_p | ||
| 16328 | && pt_row == NULL))) | ||
| 16326 | pt_row = first_row_to_display; | 16329 | pt_row = first_row_to_display; |
| 16327 | } | 16330 | } |
| 16328 | 16331 | ||
| @@ -16414,7 +16417,9 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 16414 | if (pt_row) | 16417 | if (pt_row) |
| 16415 | { | 16418 | { |
| 16416 | for (row = MATRIX_ROW (w->current_matrix, w->cursor.vpos); | 16419 | for (row = MATRIX_ROW (w->current_matrix, w->cursor.vpos); |
| 16417 | row < bottom_row && PT >= MATRIX_ROW_END_CHARPOS (row); | 16420 | row < bottom_row |
| 16421 | && PT >= MATRIX_ROW_END_CHARPOS (row) | ||
| 16422 | && !row->ends_at_zv_p; | ||
| 16418 | row++) | 16423 | row++) |
| 16419 | { | 16424 | { |
| 16420 | w->cursor.vpos++; | 16425 | w->cursor.vpos++; |