[Top][All Lists]

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

master 438cdc3: Add support for horizontal scrolling in tab-line

From: Lars Ingebrigtsen
Subject: master 438cdc3: Add support for horizontal scrolling in tab-line
Date: Mon, 7 Sep 2020 11:10:55 -0400 (EDT)

branch: master
commit 438cdc33288e0a34299c1f1985b7e405d63e75a5
Author: Daniel Martín <mardani29@yahoo.es>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Add support for horizontal scrolling in tab-line
    * lisp/tab-line.el ([tab-line wheel-left]): Bind left and right tab
    line scrolling to the 'wheel-left' and 'wheel-right' mouse events.
    ([tab-line S-wheel-right]): Analogous change for the functions that
    switch tabs.
    * etc/NEWS: Announce the new feature (bug#43224).
    Copyright-paperwork-exempt: yes
 etc/NEWS         | 5 +++++
 lisp/tab-line.el | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index f0644c8..aa3acc2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -206,6 +206,11 @@ of the next command to be displayed in a new tab.
 Show/hide the tab bar independently for each frame, according to the
 value of 'tab-bar-show'.
+*** The tabs in the tab line can now be scrolled using horizontal scroll.
+If your mouse or trackpad supports it, you can now scroll tabs when
+the mouse pointer is in the tab line by scrolling left or right.
 ** New bindings in occur-mode, 'next-error-no-select' bound to 'n' and
 'previous-error-no-select' bound to 'p'.
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index e8c4dc4..40f8095 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -764,11 +764,15 @@ from the tab line."
 (global-set-key [tab-line mouse-5]    'tab-line-hscroll-right)
 (global-set-key [tab-line wheel-up]   'tab-line-hscroll-left)
 (global-set-key [tab-line wheel-down] 'tab-line-hscroll-right)
+(global-set-key [tab-line wheel-left] 'tab-line-hscroll-left)
+(global-set-key [tab-line wheel-right] 'tab-line-hscroll-right)
 (global-set-key [tab-line S-mouse-4]    'tab-line-switch-to-prev-tab)
 (global-set-key [tab-line S-mouse-5]    'tab-line-switch-to-next-tab)
 (global-set-key [tab-line S-wheel-up]   'tab-line-switch-to-prev-tab)
 (global-set-key [tab-line S-wheel-down] 'tab-line-switch-to-next-tab)
+(global-set-key [tab-line S-wheel-left] 'tab-line-switch-to-prev-tab)
+(global-set-key [tab-line S-wheel-right] 'tab-line-switch-to-next-tab)
 (provide 'tab-line)

reply via email to

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