[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-30 74fe889a93f 4/4: Merge branch 'emacs-30' of git.savannah.gnu.or
From: |
Eli Zaretskii |
Subject: |
emacs-30 74fe889a93f 4/4: Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/emacs into emacs-30 |
Date: |
Mon, 29 Jul 2024 14:52:49 -0400 (EDT) |
branch: emacs-30
commit 74fe889a93ffefbc1e734a4e7d48073237e3d491
Merge: e09982f8f5a abefd9514bc
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/emacs into emacs-30
---
lisp/tab-bar.el | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index edec6543a82..60d5bbf169b 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -2229,14 +2229,16 @@ function `tab-bar-tab-name-function'."
(seq-position (nthcdr beg tabs) group
(lambda (tb gr)
(not (equal (alist-get 'group tb) gr))))))
- (pos (when beg
- (cond
- ;; Don't move tab when it's already inside group bounds
- ((and len (>= tab-index beg) (<= tab-index (+ beg len))) nil)
- ;; Move tab from the right to the group end
- ((and len (> tab-index (+ beg len))) (+ beg len 1))
- ;; Move tab from the left to the group beginning
- ((< tab-index beg) beg)))))
+ (pos (if beg
+ (cond
+ ;; Don't move tab when it's already inside group bounds
+ ((and len (>= tab-index beg) (<= tab-index (+ beg len)))
nil)
+ ;; Move tab from the right to the group end
+ ((and len (> tab-index (+ beg len))) (+ beg len 1))
+ ;; Move tab from the left to the group beginning
+ ((< tab-index beg) beg))
+ ;; Move tab with a new group to the end
+ -1)))
(when pos
(tab-bar-move-tab-to pos (1+ tab-index)))))