From b519df23900222df5637cbd23eba45e4bd540856 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 23 Sep 2013 12:28:57 +0300 Subject: [PATCH] Fix last commit. src/xdisp.c (note_mouse_highlight): Adapt calculation of last argument to mouse_face_from_string_pos to the previous change. Fixes: debbugs:15437 --- src/ChangeLog | 2 ++ src/xdisp.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8483bdc6216..5592e5b164e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in computing the end column of mouse-highlight that comes from display or overlay strings. (Bug#15437) + (note_mouse_highlight): Adapt calculation of last argument to + mouse_face_from_string_pos to the above change. * conf_post.h (__has_builtin): Define to zero, if undefined, on all platforms, not just for clang. diff --git a/src/xdisp.c b/src/xdisp.c index 0575c7b3282..a3173c8fc06 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -28267,7 +28267,7 @@ note_mouse_highlight (struct frame *f, int x, int y) if (NILP (s)) s = make_number (0); if (NILP (e)) - e = make_number (SCHARS (object) - 1); + e = make_number (SCHARS (object)); mouse_face_from_string_pos (w, hlinfo, object, XINT (s), XINT (e)); hlinfo->mouse_face_past_end = 0; -- 2.39.2