]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #9955 with mouse-highlight that starts at beginning of window.
authorEli Zaretskii <eliz@gnu.org>
Fri, 4 Nov 2011 20:01:06 +0000 (22:01 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 4 Nov 2011 20:01:06 +0000 (22:01 +0200)
 src/xdisp.c (note_mouse_highlight): If either of
 previous/next-single-property-change returns nil, treat that as
 the beginning or the end of the buffer.

src/ChangeLog
src/xdisp.c

index b03c609f907c3f2c35663626da07acc0c3e0bf87..624ad71379d99bce3c4c7c39a205e4f0cddbf6e2 100644 (file)
@@ -1,6 +1,12 @@
+2011-11-04  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (note_mouse_highlight): If either of
+       previous/next-single-property-change returns nil, treat that as
+       the beginning or the end of the buffer.  (Bug#9955)
+
 2011-11-04  Jan Djärv  <jan.h.d@swipnet.se>
 
-       * gtkutil.c (xg_make_tool_item): Add callbacks of one of wimage or
+       * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
        label is not null (Bug#9951).
        (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
        may be NULL.
index 257e4ad428021aef923d06e61b0f89a6a681c8ff..f358cdd62700fe366bc4cd114fa2b12ab4db3abc 100644 (file)
@@ -27152,8 +27152,12 @@ note_mouse_highlight (struct frame *f, int x, int y)
                    }
 
                  mouse_face_from_buffer_pos (window, hlinfo, pos,
-                                             XFASTINT (before),
-                                             XFASTINT (after),
+                                             NILP (before)
+                                             ? 1
+                                             : XFASTINT (before),
+                                             NILP (after)
+                                             ? BUF_Z (XBUFFER (buffer))
+                                             : XFASTINT (after),
                                              before_string, after_string,
                                              disp_string);
                  cursor = No_Cursor;