|
From: | martin rudalics |
Subject: | Re: [PATCH] Fix display-buffer-use-some-window to honor reusable-frames |
Date: | Mon, 30 Jan 2023 17:44:15 +0100 |
This + (let* ((reusable-frames (cdr (assq 'reusable-frames alist))) + (frame (or (window--frame-usable-p (selected-frame)) + (window--frame-usable-p (last-nonminibuffer-frame)))) + (window (or (get-lru-window (or reusable-frames frame) nil t)))) is probably not what you really want. AFAICT you want to reuse a window on a frame specified by 'reusable-frames' - that is a window that already shows BUFFER. But 'get-lru-window' only gives you the least recently used window of such a frame. What speaks against (defun display-buffer-use-least-recent-window (buffer alist) "..." (let* ((alist (cons (cons 'inhibit-same-window t) alist)) (window (or (display-buffer-reuse-window buffer alist) (display-buffer-use-some-window buffer alist) (display-buffer-pop-up-window buffer alist)))) (when window (window-bump-use-time window) window))) or something the like? martin
[Prev in Thread] | Current Thread | [Next in Thread] |