emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/mouse.el


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/lisp/mouse.el
Date: Sat, 31 Dec 2005 11:46:35 +0000

Index: emacs/lisp/mouse.el
diff -u emacs/lisp/mouse.el:1.290 emacs/lisp/mouse.el:1.291
--- emacs/lisp/mouse.el:1.290   Wed Dec 28 03:19:29 2005
+++ emacs/lisp/mouse.el Sat Dec 31 11:46:34 2005
@@ -355,14 +355,21 @@
 (defun mouse-drag-window-above (window)
   "Return the (or a) window directly above WINDOW.
 That means one whose bottom edge is at the same height as WINDOW's top edge."
-  (let ((top (nth 1 (window-edges window)))
+  (let ((start-top   (nth 1 (window-edges window)))
+        (start-left  (nth 0 (window-edges window)))
+        (start-right (nth 2 (window-edges window)))
        (start-window window)
        above-window)
     (setq window (previous-window window 0))
     (while (and (not above-window) (not (eq window start-window)))
-      (if (= (+ (window-height window) (nth 1 (window-edges window)))
-            top)
-         (setq above-window window))
+      (let ((left  (nth 0 (window-edges window)))
+            (right (nth 2 (window-edges window))))
+        (when (and (= (+ (window-height window) (nth 1 (window-edges window)))
+                      start-top)
+                   (or (and (<= left start-left)  (<= start-right right))
+                       (and (<= start-left left)  (<= left start-right))
+                       (and (<= start-left right) (<= right start-right))))
+          (setq above-window window)))
       (setq window (previous-window window)))
     above-window))
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]