[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39649: 27.0.60; tab-line doesn't scroll

From: Juri Linkov
Subject: bug#39649: 27.0.60; tab-line doesn't scroll
Date: Tue, 18 Feb 2020 01:03:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> tab-line doesn't scroll despite tab-line-auto-hscroll being set to t.
> When having several buffers open and switching to one that is not
> currently visible in the tab-line the tab-line won't auto-scroll.

This is an intentional feature: auto-scroll is disabled after
the first time when you scroll the tab-line manually.

Otherwise you won't be able to scroll the tab-line with the
mouse-wheel or using the arrow buttons when auto-scrolling
is still in effect during manual scrolling.

You can reset auto-scrolling by evaluating in e.g. ‘M-:’

  (set-window-parameter nil 'tab-line-hscroll nil)

But indeed this is not right way to do this - it should automatically
reset auto-scrolling at some time afterwards after finishing manually
scrolling the tab-line.  I was unable to find such a natural event on which
to reset auto-scrolling - there are too many different possible events to
choose from.  One of the most natural is to reset auto-scrolling after
manually selecting a tab.

Could you please try this patch to see if it solves your problem:

diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 8f1221abe4..86ac234f3d 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -600,6 +600,7 @@ tab-line-select-tab
   (let* ((posnp (event-start e))
          (tab (get-pos-property 1 'tab (car (posn-string posnp))))
          (buffer (if (bufferp tab) tab (cdr (assq 'buffer tab)))))
+    (set-window-parameter nil 'tab-line-hscroll nil)
     (if buffer
         (tab-line-select-tab-buffer buffer (posn-window posnp))
       (let ((select (cdr (assq 'select tab))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]