1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00

(IT_update_begin): Don't dereference members of struct

window for deleted windows.
This commit is contained in:
Eli Zaretskii 1999-12-30 14:14:38 +00:00
parent ef961722ad
commit 8ccb9a546b
2 changed files with 19 additions and 5 deletions

View File

@ -1,3 +1,8 @@
1999-12-30 Eli Zaretskii <eliz@is.elta.co.il>
* msdos.c (IT_update_begin): Don't dereference members of struct
window for deleted windows.
1999-12-30 Gerd Moellmann <gerd@gnu.org> 1999-12-30 Gerd Moellmann <gerd@gnu.org>
* abbrev.c (Fexpand_abbrev): If expanding an abbrev which has only * abbrev.c (Fexpand_abbrev): If expanding an abbrev which has only

View File

@ -1711,16 +1711,25 @@ IT_update_begin (struct frame *f)
Likewise, don't do anything if the frame is garbaged; Likewise, don't do anything if the frame is garbaged;
in that case, the frame's current matrix that we would use in that case, the frame's current matrix that we would use
is all wrong, and we will redisplay that line anyway. */ is all wrong, and we will redisplay that line anyway. */
if (!NILP (display_info->mouse_face_window)) if (!NILP (display_info->mouse_face_window)
&& WINDOWP (display_info->mouse_face_window))
{ {
struct window *w = XWINDOW (display_info->mouse_face_window); struct window *w = XWINDOW (display_info->mouse_face_window);
int i; int i;
for (i = 0; i < w->desired_matrix->nrows; ++i) /* If the mouse highlight is in the window that was deleted
if (MATRIX_ROW_ENABLED_P (w->desired_matrix, i)) (e.g., if it was popped by completion), clear highlight
break; unconditionally. */
if (NILP (w->buffer))
display_info->mouse_face_window = Qnil;
else
{
for (i = 0; i < w->desired_matrix->nrows; ++i)
if (MATRIX_ROW_ENABLED_P (w->desired_matrix, i))
break;
}
if (i < w->desired_matrix->nrows) if (NILP (w->buffer) || i < w->desired_matrix->nrows)
clear_mouse_face (display_info); clear_mouse_face (display_info);
} }
} }