Mercurial > emacs
changeset 111904:5c6c43239aa4
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).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 04 Dec 2010 19:32:32 -0500 |
parents | d567b4182a1a |
children | 0d5ab24d31df |
files | src/ChangeLog src/xdisp.c |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sat Dec 04 17:43:51 2010 -0500 +++ b/src/ChangeLog Sat Dec 04 19:32:32 2010 -0500 @@ -1,3 +1,8 @@ +2010-12-05 Chong Yidong <cyd@stupidchicken.com> + + * xdisp.c (try_scrolling): Avoid infloop if the first line is + obscured due to a vscroll (Bug#7537). + 2010-12-02 Jan Djärv <jhd@zeplinf.localdomain> * nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGHT.
--- a/src/xdisp.c Sat Dec 04 17:43:51 2010 -0500 +++ b/src/xdisp.c Sat Dec 04 19:32:32 2010 -0500 @@ -12759,7 +12759,11 @@ /* If cursor ends up on a partially visible line, treat that as being off the bottom of the screen. */ - if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0)) + if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0) + /* It's possible that the cursor is on the first line of the + buffer, which is partially obscured due to a vscroll + (Bug#7537). In that case, avoid looping forever . */ + && extra_scroll_margin_lines < w->desired_matrix->nrows - 1) { clear_glyph_matrix (w->desired_matrix); ++extra_scroll_margin_lines;