diff options
author | Eli Zaretskii <eliz@gnu.org> | 2011-11-04 22:01:06 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2011-11-04 22:01:06 +0200 |
commit | a58c13ed78ff7fff3e77348c98ecc0d987eda52c (patch) | |
tree | bda4f26785661c8180489f7e5e8dab35f1016794 | |
parent | fe0b6370b7415d81b575bac22caea623aa69c9c1 (diff) | |
download | emacs-a58c13ed78ff7fff3e77348c98ecc0d987eda52c.tar.gz emacs-a58c13ed78ff7fff3e77348c98ecc0d987eda52c.tar.bz2 emacs-a58c13ed78ff7fff3e77348c98ecc0d987eda52c.zip |
Fix bug #9955 with mouse-highlight that starts at beginning of window.
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.
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/xdisp.c | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b03c609f907..624ad71379d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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. diff --git a/src/xdisp.c b/src/xdisp.c index 257e4ad4280..f358cdd6270 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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; |