mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-11 08:30:45 -08:00
Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/emacs into emacs-30
This commit is contained in:
commit
74fe889a93
1 changed files with 10 additions and 8 deletions
|
|
@ -2229,14 +2229,16 @@ function `tab-bar-tab-name-function'."
|
||||||
(seq-position (nthcdr beg tabs) group
|
(seq-position (nthcdr beg tabs) group
|
||||||
(lambda (tb gr)
|
(lambda (tb gr)
|
||||||
(not (equal (alist-get 'group tb) gr))))))
|
(not (equal (alist-get 'group tb) gr))))))
|
||||||
(pos (when beg
|
(pos (if beg
|
||||||
(cond
|
(cond
|
||||||
;; Don't move tab when it's already inside group bounds
|
;; Don't move tab when it's already inside group bounds
|
||||||
((and len (>= tab-index beg) (<= tab-index (+ beg len))) nil)
|
((and len (>= tab-index beg) (<= tab-index (+ beg len))) nil)
|
||||||
;; Move tab from the right to the group end
|
;; Move tab from the right to the group end
|
||||||
((and len (> tab-index (+ beg len))) (+ beg len 1))
|
((and len (> tab-index (+ beg len))) (+ beg len 1))
|
||||||
;; Move tab from the left to the group beginning
|
;; Move tab from the left to the group beginning
|
||||||
((< tab-index beg) beg)))))
|
((< tab-index beg) beg))
|
||||||
|
;; Move tab with a new group to the end
|
||||||
|
-1)))
|
||||||
(when pos
|
(when pos
|
||||||
(tab-bar-move-tab-to pos (1+ tab-index)))))
|
(tab-bar-move-tab-to pos (1+ tab-index)))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue