From a871441db10a5ec54f72f2b569f4a2096786659d Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 15 Jun 2000 22:51:37 +0000 Subject: [PATCH] (update_frame_1): Handle case that cursor vpos is out of bounds. --- src/ChangeLog | 5 +++++ src/dispnew.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) 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); -- 2.39.5