GNU bug report logs - #72352
Small tab-bar-move-tab-to-group bug fix

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Mon, 29 Jul 2024 13:21:02 UTC

Severity: normal

Fixed in version 30.0.60

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Small tab-bar-move-tab-to-group bug fix
Date: Mon, 29 Jul 2024 09:20:19 -0400
[Message part 1 (text/plain, inline)]
This corrects for the condition where a tab, among its set of tabs which
all share the same group (nil or otherwise), is changed to a new group that
doesn't yet exist. The current behavior is to leave that tab where it is
within the "old group" but this is counter to the goal of keeping
group-related tabs "together." The correction I've made is simply to move
that newly grouped tab to the end. I've tested this and been using a
patched form for a while to no ill effect.

(defun tab-bar-move-tab-to-group (&optional tab)
...

*         (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))

*                -1))) ; Move to the end*
...

Much obliged,

Stephane
[Message part 2 (text/html, inline)]

This bug report was last modified 296 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.