branch: externals/bufferlo
commit 861cca9ac78c0eae16ecff3c36a3af4f411bed69
Author: shipmints <[email protected]>
Commit: Flo Rommel <[email protected]>
Correct bufferlo--tab-bar-undo-close-tab-advice duplicate check
---
bufferlo.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/bufferlo.el b/bufferlo.el
index e05143451e..6561cd829e 100644
--- a/bufferlo.el
+++ b/bufferlo.el
@@ -1343,7 +1343,10 @@ the advised functions. Honors
`bufferlo-bookmark-tab-duplicate-policy'."
(apply oldfn args))
(when-let* ((current-tab (bufferlo--current-tab))
(bookmark-name (alist-get 'bufferlo-bookmark-tab-name
current-tab))
- (abm (assoc bookmark-name (bufferlo--active-bookmarks))))
+ (this+at-least-one-other
+ (when (> (seq-count (lambda (x) (string= bookmark-name (car x)))
+ (bufferlo--active-bookmarks)) 1)
+ t)))
(let* ((msg nil)
(msg-append (lambda (s) (setq msg (concat msg "; " s)))))
(catch :raise
@@ -1362,7 +1365,9 @@ the advised functions. Honors
`bufferlo-bookmark-tab-duplicate-policy'."
(funcall msg-append "cleared tab bookmark"))
('raise
(tab-bar-close-tab)
- (bufferlo--bookmark-raise abm)
+ ;; Find bookmark to raise; tab numbers changes when closing.
+ (bufferlo--bookmark-raise
+ (assoc bookmark-name (bufferlo--active-bookmarks)))
(throw :raise t)))
(setf (alist-get 'bufferlo-bookmark-tab-name
(cdr current-tab))