emacs-diffs
[Top][All Lists]
Advanced

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

master 6b71d0b1786: * lisp/tab-bar.el (tab-bar-select-tab): Fix tab-bar-


From: Juri Linkov
Subject: master 6b71d0b1786: * lisp/tab-bar.el (tab-bar-select-tab): Fix tab-bar-history-mode.
Date: Tue, 14 Jan 2025 13:21:57 -0500 (EST)

branch: master
commit 6b71d0b1786928474741c356eb7199746f07eb62
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/tab-bar.el (tab-bar-select-tab): Fix tab-bar-history-mode.
    
    Reset the values of 'tab-bar-history-back' and 'tab-bar-history-forward'
    to nil to not retain a previous tab's history after switching to another
    tab using window-state.
---
 lisp/tab-bar.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 0858e7b4634..b570949bfec 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1662,7 +1662,11 @@ Negative TAB-NUMBER counts tabs from the end of the tab 
bar."
           ;; `window-state-put' fails when called in the minibuffer
           (when (window-minibuffer-p)
             (select-window (get-mru-window)))
-          (window-state-put ws nil 'safe)))
+          (window-state-put ws nil 'safe)
+
+          (when tab-bar-history-mode
+            (puthash (selected-frame) nil tab-bar-history-back)
+            (puthash (selected-frame) nil tab-bar-history-forward))))
 
         (when tab-bar-select-restore-context
           (window-point-context-use))



reply via email to

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