summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2011-10-28 23:17:09 +0800
committerChong Yidong <cyd@gnu.org>2011-10-28 23:17:09 +0800
commitd3d0842fe219892079cac179ab0843792f29cf1a (patch)
tree4e3b8bdacdfabbae7d93ab376099b1910eed6258
parent8cedc5acf983ed7736e8ad59528dbbf62bde7ade (diff)
downloademacs-d3d0842fe219892079cac179ab0843792f29cf1a.tar.gz
* src/xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
See: http://lists.gnu.org/archive/html/emacs-devel/2011-10/msg01202.html
-rw-r--r--src/ChangeLog4
-rw-r--r--src/xdisp.c11
2 files changed, 11 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 21ec98fa217..da0ba4b11f2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2011-10-28 Chong Yidong <cyd@gnu.org>
+
+ * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
+
2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
* window.c (make_window): Initialize phys_cursor_on_p.
diff --git a/src/xdisp.c b/src/xdisp.c
index 0757feed1d9..296b2d13219 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -26835,11 +26835,14 @@ note_mouse_highlight (struct frame *f, int x, int y)
/* Which window is that in? */
window = window_from_coordinates (f, x, y, &part, 1);
- /* If we were displaying active text in another window, clear that.
- Also clear if we move out of text area in same window. */
+ /* If displaying active text in another window, clear that. */
if (! EQ (window, hlinfo->mouse_face_window)
- || (part != ON_TEXT && part != ON_MODE_LINE && part != ON_HEADER_LINE
- && !NILP (hlinfo->mouse_face_window)))
+ /* Also clear if we move out of text area in same window. */
+ || (!NILP (hlinfo->mouse_face_window)
+ && !NILP (window)
+ && part != ON_TEXT
+ && part != ON_MODE_LINE
+ && part != ON_HEADER_LINE))
clear_mouse_face (hlinfo);
/* Not on a window -> return. */