aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2011-10-29 11:36:42 +0200
committerEli Zaretskii2011-10-29 11:36:42 +0200
commit567843934e76b72de93f61d0f35a4aa91f1c76b2 (patch)
treefcb7f92a564f8d1d8fdf73a4304c130f355a4450 /src
parent21b7206797c252bb6e568e37d10a9fa2b2812747 (diff)
downloademacs-567843934e76b72de93f61d0f35a4aa91f1c76b2.tar.gz
emacs-567843934e76b72de93f61d0f35a4aa91f1c76b2.zip
Fix bug #9902 with crash caused by clearing mouse highlight.
src/xdisp.c (note_mouse_highlight): Don't clear mouse highlight if hlinfo->mouse_face_window is nil.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c16
2 files changed, 13 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5a7d66ceb17..69c202faa4c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-10-29 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (note_mouse_highlight): Don't clear mouse highlight if
4 hlinfo->mouse_face_window is nil. (Bug#9902)
5
12011-10-29 Andreas Schwab <schwab@linux-m68k.org> 62011-10-29 Andreas Schwab <schwab@linux-m68k.org>
2 7
3 * minibuf.c (read_minibuf_noninteractive): Allow reading empty 8 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
diff --git a/src/xdisp.c b/src/xdisp.c
index 22f7c2bbd26..3cce8012da0 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -26835,14 +26835,14 @@ note_mouse_highlight (struct frame *f, int x, int y)
26835 /* Which window is that in? */ 26835 /* Which window is that in? */
26836 window = window_from_coordinates (f, x, y, &part, 1); 26836 window = window_from_coordinates (f, x, y, &part, 1);
26837 26837
26838 /* If displaying active text in another window, clear that. */ 26838 if (!NILP (hlinfo->mouse_face_window)
26839 if (! EQ (window, hlinfo->mouse_face_window) 26839 /* If displaying active text in another window, clear that. */
26840 /* Also clear if we move out of text area in same window. */ 26840 && (!EQ (window, hlinfo->mouse_face_window)
26841 || (!NILP (hlinfo->mouse_face_window) 26841 /* Also clear if we move out of text area in same window. */
26842 && !NILP (window) 26842 || (!NILP (window)
26843 && part != ON_TEXT 26843 && part != ON_TEXT
26844 && part != ON_MODE_LINE 26844 && part != ON_MODE_LINE
26845 && part != ON_HEADER_LINE)) 26845 && part != ON_HEADER_LINE)))
26846 clear_mouse_face (hlinfo); 26846 clear_mouse_face (hlinfo);
26847 26847
26848 /* Not on a window -> return. */ 26848 /* Not on a window -> return. */