Fix use of uninitialized var (backport from trunk).
authorChong Yidong <cyd@gnu.org>
Mon, 9 Jan 2012 09:35:21 +0000 (17:35 +0800)
committerChong Yidong <cyd@gnu.org>
Mon, 9 Jan 2012 09:35:21 +0000 (17:35 +0800)
* xdisp.c (note_mouse_highlight): Fix use of uninitialized var.

src/ChangeLog
src/xdisp.c

index c819bb0..fcaff20 100644 (file)
@@ -1,3 +1,7 @@
+2012-01-09  Chong Yidong  <cyd@gnu.org>
+
+       * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
+
 2012-01-09  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
index 8e5cf3d..ed0cff5 100644 (file)
@@ -23518,11 +23518,14 @@ note_mouse_highlight (f, x, y)
   /* Which window is that in?  */
   window = window_from_coordinates (f, x, y, &part, 0, 0, 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 (! EQ (window, dpyinfo->mouse_face_window)
-      || (part != ON_TEXT && part != ON_MODE_LINE && part != ON_HEADER_LINE
-         && !NILP (dpyinfo->mouse_face_window)))
+  /* If displaying active text in another window, clear that.  */
+  if (! EQ (window, 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 (dpyinfo);
 
   /* Not on a window -> return.  */