'nomini)))
", "))
+\f
(defvar tab-bar-tabs-function #'tab-bar-tabs
"Function to get a list of tabs to display in the tab bar.
This function should return a list of alists with parameters
(set-frame-parameter nil 'tabs tabs))
tabs))
+\f
(defun tab-bar-make-keymap-1 ()
"Generate an actual keymap from `tab-bar-map', without caching."
(let* ((separator (or tab-bar-separator (if window-system " " "|")))
(let* ((tabs (funcall tab-bar-tabs-function))
(from-index (or from-index (1+ (tab-bar--current-tab-index tabs))))
(from-tab (nth (1- from-index) tabs))
- (to-index (max 0 (min (1- to-index) (1- (length tabs))))))
+ (to-index (max 0 (min (1- (or to-index 1)) (1- (length tabs))))))
(setq tabs (delq from-tab tabs))
(cl-pushnew from-tab (nthcdr to-index tabs))
(set-frame-parameter nil 'tabs tabs)
\f
;;; Tab history mode
-(defvar tab-bar-history-limit 3
+(defvar tab-bar-history-limit 10
"The number of history elements to keep.")
(defvar tab-bar-history-omit nil
"Minibuffer depth before the current command.")
(defun tab-bar-history--pre-change ()
- (setq tab-bar-history--minibuffer-depth (minibuffer-depth)
- tab-bar-history-current
- `((wc . ,(current-window-configuration))
- (wc-point . ,(point-marker)))))
+ (setq tab-bar-history--minibuffer-depth (minibuffer-depth))
+ ;; Store wc before possibly entering the minibuffer
+ (when (zerop tab-bar-history--minibuffer-depth)
+ (setq tab-bar-history-current
+ `((wc . ,(current-window-configuration))
+ (wc-point . ,(point-marker))))))
(defun tab-bar--history-change ()
(when (and (not tab-bar-history-omit)
tab-bar-history-current
- ;; Entering the minibuffer
- (zerop tab-bar-history--minibuffer-depth)
- ;; Exiting the minibuffer
- (zerop (minibuffer-depth)))
+ ;; Store wc before possibly entering the minibuffer
+ (zerop tab-bar-history--minibuffer-depth))
(puthash (selected-frame)
(seq-take (cons tab-bar-history-current
(gethash (selected-frame) tab-bar-history-back))