aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii1999-12-30 14:14:38 +0000
committerEli Zaretskii1999-12-30 14:14:38 +0000
commit8ccb9a546b981224e8e354ea2a818541e6e9b610 (patch)
tree16b8f0af229b6425c4a9a514908b88050457ce1c /src
parentef961722ad3e23cc1dbe1bd8cbb6efe3e3e63eda (diff)
downloademacs-8ccb9a546b981224e8e354ea2a818541e6e9b610.tar.gz
emacs-8ccb9a546b981224e8e354ea2a818541e6e9b610.zip
(IT_update_begin): Don't dereference members of struct
window for deleted windows.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/msdos.c19
2 files changed, 19 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 413db7655c1..9c4ce9ec50b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
11999-12-30 Eli Zaretskii <eliz@is.elta.co.il>
2
3 * msdos.c (IT_update_begin): Don't dereference members of struct
4 window for deleted windows.
5
11999-12-30 Gerd Moellmann <gerd@gnu.org> 61999-12-30 Gerd Moellmann <gerd@gnu.org>
2 7
3 * abbrev.c (Fexpand_abbrev): If expanding an abbrev which has only 8 * abbrev.c (Fexpand_abbrev): If expanding an abbrev which has only
diff --git a/src/msdos.c b/src/msdos.c
index cd969127fe1..3cd0d7e5a4e 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -1711,16 +1711,25 @@ IT_update_begin (struct frame *f)
1711 Likewise, don't do anything if the frame is garbaged; 1711 Likewise, don't do anything if the frame is garbaged;
1712 in that case, the frame's current matrix that we would use 1712 in that case, the frame's current matrix that we would use
1713 is all wrong, and we will redisplay that line anyway. */ 1713 is all wrong, and we will redisplay that line anyway. */
1714 if (!NILP (display_info->mouse_face_window)) 1714 if (!NILP (display_info->mouse_face_window)
1715 && WINDOWP (display_info->mouse_face_window))
1715 { 1716 {
1716 struct window *w = XWINDOW (display_info->mouse_face_window); 1717 struct window *w = XWINDOW (display_info->mouse_face_window);
1717 int i; 1718 int i;
1718 1719
1719 for (i = 0; i < w->desired_matrix->nrows; ++i) 1720 /* If the mouse highlight is in the window that was deleted
1720 if (MATRIX_ROW_ENABLED_P (w->desired_matrix, i)) 1721 (e.g., if it was popped by completion), clear highlight
1721 break; 1722 unconditionally. */
1723 if (NILP (w->buffer))
1724 display_info->mouse_face_window = Qnil;
1725 else
1726 {
1727 for (i = 0; i < w->desired_matrix->nrows; ++i)
1728 if (MATRIX_ROW_ENABLED_P (w->desired_matrix, i))
1729 break;
1730 }
1722 1731
1723 if (i < w->desired_matrix->nrows) 1732 if (NILP (w->buffer) || i < w->desired_matrix->nrows)
1724 clear_mouse_face (display_info); 1733 clear_mouse_face (display_info);
1725 } 1734 }
1726 } 1735 }