bmag / emacs-purpose

Manage Windows and Buffers According to Purposes
GNU General Public License v3.0
498 stars 23 forks source link

Fix dangling popup #176

Closed wyuenho closed 3 years ago

wyuenho commented 3 years ago

According to the elisp manual, when a window isn't deleted after a quit-restore-window is run (which is called from quit-window, which is bound to q on a lot of popup-y modes), it's previous buffer will be used to replace the current buffer and the quit-restore window parameter set to nil. When this parameter isnil` and there are't previous buffers can be shown, then we should be sure to know we've just killed the last popup buffer in this window, and this window can thus be closed.