Commit a74b0a72 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(sup-pos-to-window): Use some-window instead

of cycling through windows with next-window.
parent 90601de9
......@@ -191,18 +191,6 @@ X and Y are 0-based character positions in the window."
(defun sup-pos-to-window (x y)
"Find window corresponding to frame coordinates.
X and Y are 0-based character positions on the frame."
(let ((edges (window-edges))
(window nil))
(while (and (not (eq window (selected-window)))
(or (< y (nth 1 edges))
(>= y (nth 3 edges))
(< x (nth 0 edges))
(>= x (nth 2 edges))))
(setq window (next-window window))
(setq edges (window-edges window))
)
(or window (selected-window))
)
)
(some-window (lambda (w) (coordinates-in-window-p (cons x y) w))))
;;; sup-mouse.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment