diff options
author | Juri Linkov <juri@linkov.net> | 2019-11-10 23:30:41 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2019-11-10 23:30:41 +0200 |
commit | 6ad5eb97940b07bf8d28f8517608351b3af1221c (patch) | |
tree | 5029491a47c651ab6d8eb861834dbfedcbe055f2 /lisp | |
parent | 7e151f5bcfe431c31528743705e6ab56cf8dc220 (diff) | |
download | emacs-6ad5eb97940b07bf8d28f8517608351b3af1221c.tar.gz emacs-6ad5eb97940b07bf8d28f8517608351b3af1221c.tar.bz2 emacs-6ad5eb97940b07bf8d28f8517608351b3af1221c.zip |
* lisp/tab-bar.el: Better handling of closed-tabs in tab-bar-list.
* lisp/tab-bar.el (tab-bar-list-delete-from-list): Add closed tab to
tab-bar-closed-tabs.
(tab-bar-list-select): Don't add the closed intermediate tab to
tab-bar-closed-tabs.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/tab-bar.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index e00839572c8..95835862ff8 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -1210,6 +1210,10 @@ Then move up one line. Prefix arg means move that many lines." (defun tab-bar-list-delete-from-list (tab) "Delete the window configuration from both lists." + (push `((frame . ,(selected-frame)) + (index . ,(tab-bar--tab-index tab)) + (tab . ,tab)) + tab-bar-closed-tabs) (set-frame-parameter nil 'tabs (delq tab (funcall tab-bar-tabs-function)))) (defun tab-bar-list-execute () @@ -1238,8 +1242,10 @@ in the selected frame." (interactive) (let* ((to-tab (tab-bar-list-current-tab t))) (kill-buffer (current-buffer)) - ;; Delete the current window configuration - (tab-bar-close-tab nil (1+ (tab-bar--tab-index to-tab))))) + ;; Delete the current window configuration of tab list + ;; without storing it in the undo list of closed tabs + (let (tab-bar-closed-tabs) + (tab-bar-close-tab nil (1+ (tab-bar--tab-index to-tab)))))) (defun tab-bar-list-mouse-select (event) "Select the window configuration whose line you click on." |