]> git.eshelyaron.com Git - emacs.git/commitdiff
(make_lispy_position): Only use PT if the selected window is current.
authorChong Yidong <cyd@stupidchicken.com>
Tue, 2 Dec 2008 23:12:56 +0000 (23:12 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 2 Dec 2008 23:12:56 +0000 (23:12 +0000)
src/keyboard.c

index ad6665e60682a62f57423e5c9a0a31fbb490ef36..77d58931d14bfe0c3cec626ed859bd51c0d2334b 100644 (file)
@@ -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;