Mercurial > emacs
comparison src/dispnew.c @ 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 | 979a75b2755b |
children | 171ba59e1cb0 |
comparison
equal
deleted
inserted
replaced
29686:96d2f2baa0bf | 29687:5d67ef29764b |
---|---|
4722 else | 4722 else |
4723 { | 4723 { |
4724 /* We have only one cursor on terminal frames. Use it to | 4724 /* We have only one cursor on terminal frames. Use it to |
4725 display the cursor of the selected window. */ | 4725 display the cursor of the selected window. */ |
4726 struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); | 4726 struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); |
4727 if (w->cursor.vpos >= 0) | 4727 if (w->cursor.vpos >= 0 |
4728 /* The cursor vpos may be temporarily out of bounds | |
4729 in the following situation: There is one window, | |
4730 with the cursor in the lower half of it. The window | |
4731 is split, and a message causes a redisplay before | |
4732 a new cursor position has been computed. */ | |
4733 && w->cursor.vpos < XFASTINT (w->height)) | |
4728 { | 4734 { |
4729 int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos); | 4735 int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos); |
4730 int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos); | 4736 int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos); |
4731 | 4737 |
4732 if (INTEGERP (w->left_margin_width)) | 4738 if (INTEGERP (w->left_margin_width)) |