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.
(cherry picked from commit
6b71d0b1786928474741c356eb7199746f07eb62)
;; `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))