Mercurial > emacs
changeset 29687:5d67ef29764b
(update_frame_1): Handle case that cursor vpos is
out of bounds.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 15 Jun 2000 22:51:01 +0000 |
parents | 96d2f2baa0bf |
children | 7654031e8bd8 |
files | src/dispnew.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dispnew.c Thu Jun 15 19:52:15 2000 +0000 +++ b/src/dispnew.c Thu Jun 15 22:51:01 2000 +0000 @@ -4724,7 +4724,13 @@ /* We have only one cursor on terminal frames. Use it to display the cursor of the selected window. */ struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); - if (w->cursor.vpos >= 0) + if (w->cursor.vpos >= 0 + /* The cursor vpos may be temporarily out of bounds + in the following situation: There is one window, + with the cursor in the lower half of it. The window + is split, and a message causes a redisplay before + a new cursor position has been computed. */ + && w->cursor.vpos < XFASTINT (w->height)) { int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos); int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);