# HG changeset patch # User Gerd Moellmann # Date 961109461 0 # Node ID 5d67ef29764b25744aee72c5a3fa9e1b88199c5e # Parent 96d2f2baa0bfe1cdda306f4d46a62673f754cd30 (update_frame_1): Handle case that cursor vpos is out of bounds. diff -r 96d2f2baa0bf -r 5d67ef29764b src/dispnew.c --- 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);