bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59862: quit-restore per window buffer


From: Juri Linkov
Subject: bug#59862: quit-restore per window buffer
Date: Fri, 14 Jun 2024 20:35:30 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> The check is in 'window-deletable-p' which may return 'frame' iff WINDOW
> is its frame's root window.  Maybe you also want to check whether the
> second element of 'quit-restore' is 'frame' but that I cannot tell.

Ok, so here is the corresponding fix for the case:

  C-x t t   ;; other-tab-prefix
  C-h i     ;; info
  C-h e     ;; view-echo-area-messages
  q         ;; quit-window

diff --git a/lisp/window.el b/lisp/window.el
index b7bd59bc813..f206153e017 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5243,7 +5258,10 @@ quit-restore-window
       (window--quit-restore-select-window quit-restore-2))
      ((and (not prev-buffer)
           (eq (nth 1 quit-restore) 'tab)
-          (eq (nth 3 quit-restore) buffer))
+          (eq (nth 3 quit-restore) buffer)
+          (< (seq-count (lambda (w) (window-parameter w 'quit-restore))
+                        (window-list-1 nil 'nomini))
+              2))
       (tab-bar-close-tab)
       ;; If the previously selected window is still alive, select it.
       (window--quit-restore-select-window quit-restore-2))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]