1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-05 20:43:08 +00:00

winner no longer holds on to dead frames

* lisp/winner.el (winner-change-fun): Cull dead frames.
This prevents a potentially massive memory leak.  See:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00619.html
This commit is contained in:
Dima Kogan 2015-09-15 11:53:54 -07:00 committed by Paul Eggert
parent b0f4acfcb7
commit d605a539d4

View File

@ -177,6 +177,11 @@ You may want to include buffer names such as *Help*, *Apropos*,
;; Called whenever the window configuration changes
;; (a `window-configuration-change-hook').
(defun winner-change-fun ()
;; Cull dead frames.
(setq winner-modified-list
(cl-remove-if-not 'frame-live-p winner-modified-list))
(unless (or (memq (selected-frame) winner-modified-list)
(/= 0 (minibuffer-depth)))
(push (selected-frame) winner-modified-list)))