From 9373034275dc04fdd4d32bc67178b2d9d00a83f8 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 2 Dec 2008 23:12:56 +0000 Subject: [PATCH] (make_lispy_position): Only use PT if the selected window is current. --- src/keyboard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/keyboard.c b/src/keyboard.c index ad6665e6068..77d58931d14 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -5304,7 +5304,8 @@ make_lispy_position (f, x, y, time) &object, &dx, &dy, &width, &height); if (STRINGP (string)) string_info = Fcons (string, make_number (charpos)); - if (w == XWINDOW (selected_window)) + if (w == XWINDOW (selected_window) + && current_buffer == XBUFFER (w->buffer)) textpos = PT; else textpos = XMARKER (w->pointm)->charpos; -- 2.39.2