(mouse-save-then-kill): Get point-before-scroll
authorRichard M. Stallman <rms@gnu.org>
Wed, 8 Apr 1998 07:22:05 +0000 (07:22 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 8 Apr 1998 07:22:05 +0000 (07:22 +0000)
from the right buffer.

lisp/mouse.el

index e1b7e51..8d3c775 100644 (file)
@@ -922,7 +922,9 @@ selection through the word or line clicked on.  If you do this
 again in a different position, it extends the selection again.
 If you do this twice in the same position, the selection is killed." 
   (interactive "e")
-  (let ((before-scroll point-before-scroll))
+  (let ((before-scroll
+        (with-current-buffer (window-buffer (posn-window (event-start click)))
+          point-before-scroll)))
     (mouse-minibuffer-check click)
     (let ((click-posn (posn-point (event-start click)))
          ;; Don't let a subsequent kill command append to this one: