changeset 100130:0410bbc1ef45

(make_lispy_position): Only use PT if the selected window is current.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 02 Dec 2008 23:12:56 +0000
parents 73a126667563
children 0e4115b39b5d
files src/keyboard.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Tue Dec 02 23:12:38 2008 +0000
+++ b/src/keyboard.c	Tue Dec 02 23:12:56 2008 +0000
@@ -5304,7 +5304,8 @@
 				     &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;