diff options
| author | Chong Yidong | 2010-12-04 19:32:32 -0500 |
|---|---|---|
| committer | Chong Yidong | 2010-12-04 19:32:32 -0500 |
| commit | 77f1ed6cb665b06fc1cdd4e2707932f0b499d481 (patch) | |
| tree | 4d0e035978fcfd7a27703c80314c5e61bb54964c /src | |
| parent | 6ed96c33f0fb05488bb45fc4ed5018a0cd3e45a7 (diff) | |
| download | emacs-77f1ed6cb665b06fc1cdd4e2707932f0b499d481.tar.gz emacs-77f1ed6cb665b06fc1cdd4e2707932f0b499d481.zip | |
Avoid infloop when scrolling conservatively (Bug#7537).
* src/xdisp.c (try_scrolling): Avoid infloop if the first line is obscured
due to a vscroll (Bug#7537).
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 025161cc395..95f7039eaf7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-12-05 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * xdisp.c (try_scrolling): Avoid infloop if the first line is | ||
| 4 | obscured due to a vscroll (Bug#7537). | ||
| 5 | |||
| 1 | 2010-12-02 Jan Djärv <jhd@zeplinf.localdomain> | 6 | 2010-12-02 Jan Djärv <jhd@zeplinf.localdomain> |
| 2 | 7 | ||
| 3 | * nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGHT. | 8 | * nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGHT. |
diff --git a/src/xdisp.c b/src/xdisp.c index a416c8ff435..dbe3e443c67 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -12759,7 +12759,11 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 12759 | 12759 | ||
| 12760 | /* If cursor ends up on a partially visible line, | 12760 | /* If cursor ends up on a partially visible line, |
| 12761 | treat that as being off the bottom of the screen. */ | 12761 | treat that as being off the bottom of the screen. */ |
| 12762 | if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0)) | 12762 | if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0) |
| 12763 | /* It's possible that the cursor is on the first line of the | ||
| 12764 | buffer, which is partially obscured due to a vscroll | ||
| 12765 | (Bug#7537). In that case, avoid looping forever . */ | ||
| 12766 | && extra_scroll_margin_lines < w->desired_matrix->nrows - 1) | ||
| 12763 | { | 12767 | { |
| 12764 | clear_glyph_matrix (w->desired_matrix); | 12768 | clear_glyph_matrix (w->desired_matrix); |
| 12765 | ++extra_scroll_margin_lines; | 12769 | ++extra_scroll_margin_lines; |