+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>
* abbrev.c (Fexpand_abbrev): If expanding an abbrev which has only
Likewise, don't do anything if the frame is garbaged;
in that case, the frame's current matrix that we would use
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);
int i;
- for (i = 0; i < w->desired_matrix->nrows; ++i)
- if (MATRIX_ROW_ENABLED_P (w->desired_matrix, i))
- break;
+ /* If the mouse highlight is in the window that was deleted
+ (e.g., if it was popped by completion), clear highlight
+ 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);
}
}