From: Gerd Moellmann Date: Thu, 15 Jun 2000 22:51:37 +0000 (+0000) Subject: (update_frame_1): Handle case that cursor vpos is X-Git-Tag: emacs-pretest-21.0.90~3289 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a871441db10a5ec54f72f2b569f4a2096786659d;p=emacs.git (update_frame_1): Handle case that cursor vpos is out of bounds. --- diff --git a/src/ChangeLog b/src/ChangeLog index 7ec49c531c4..e3a423e7eae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-06-16 Gerd Moellmann + + * dispnew.c (update_frame_1): Handle case that cursor vpos is + out of bounds. + 2000-06-15 Eli Zaretskii * unexec.c (toplevel): Fix last change, so as not to deprive MSDOS diff --git a/src/dispnew.c b/src/dispnew.c index c114849bb07..da538cc658e 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -4724,7 +4724,13 @@ update_frame_1 (f, force_p, inhibit_id_p) /* 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);