aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
authorGerd Moellmann <[email protected]>2000-07-03 09:11:03 +0000
committerGerd Moellmann <[email protected]>2000-07-03 09:11:03 +0000
commita74b0a725ac1699b1cb0e2b11dc782ff68d9364f (patch)
tree0b12d76503212ad88866292c6926efa5e30a7481 /lisp/term
parent90601de977560fa533fc80a7f299857d33869a95 (diff)
(sup-pos-to-window): Use some-window instead
of cycling through windows with next-window.
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/sup-mouse.el14
1 files changed, 1 insertions, 13 deletions
diff --git a/lisp/term/sup-mouse.el b/lisp/term/sup-mouse.el
index 0075b30252..13fb796e39 100644
--- a/lisp/term/sup-mouse.el
+++ b/lisp/term/sup-mouse.el
@@ -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