Mercurial > emacs
diff src/xdisp.c @ 49980:134f7d22f54a
(redisplay_window): Fix infinite loop in redisplay.
If centering point failed to make whole line visible and vscroll
is non-zero, disable vscroll and try centering point again.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Tue, 25 Feb 2003 12:33:07 +0000 |
parents | 501cc377f2ab |
children | 0b192c622b66 |
line wrap: on
line diff
--- a/src/xdisp.c Tue Feb 25 12:29:03 2003 +0000 +++ b/src/xdisp.c Tue Feb 25 12:33:07 2003 +0000 @@ -10822,6 +10822,14 @@ if (!make_cursor_line_fully_visible (w)) { + /* If vscroll is enabled, disable it and try again. */ + if (w->vscroll) + { + w->vscroll = 0; + clear_glyph_matrix (w->desired_matrix); + goto recenter; + } + /* If centering point failed to make the whole line visible, put point at the top instead. That has to make the whole line visible, if it can be done. */