From 788b39740a657b6359162ad79cc511b461ee6a27 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 19 Nov 2025 09:31:28 +0100 Subject: [PATCH] Fix 'make_lispy_position' for left margin clicks (Bug#79846) * src/keyboard.c (make_lispy_position): When calculating a position in the left margin skip any scroll bar on the left of the associated window (Bug#79846). --- src/keyboard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/keyboard.c b/src/keyboard.c index 016a79082aa..6c01811c2d8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -5872,7 +5872,8 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, ptrdiff_t charpos; posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin; - col = wx; + /* Skip any scroll bar on the left (Bug#79846). */ + col = wx - WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w); row = wy; string = marginal_area_string (w, part, &col, &row, &charpos, &object, &dx, &dy, &width, &height);