Created
September 29, 2010 11:12
-
-
Save bowbow99/602564 to your computer and use it in GitHub Desktop.
一番左下の window を探す #xyzzy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package :editor) | |
(defun find-most-left/bottom-window (&optional (start (selected-window))) | |
(if (= (count-windows) 1) | |
(selected-window) | |
(do* ((win (next-window start) (next-window win)) | |
(coord (window-coordinate win) (window-coordinate win)) | |
(most (cons start (window-coordinate start)))) | |
((eql win start) | |
(car most)) | |
(when (and (zerop (first coord)) | |
(or (not (zerop (first (cdr most)))) | |
(> (second coord) (second (cdr most))))) | |
(setq most (cons win coord)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment