[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 6fc94fb: * lisp/tab-bar.el: Use 'mouse-1' for history buttons l
From: |
Juri Linkov |
Subject: |
emacs-28 6fc94fb: * lisp/tab-bar.el: Use 'mouse-1' for history buttons like for 'add-tab' button |
Date: |
Thu, 18 Nov 2021 12:37:15 -0500 (EST) |
branch: emacs-28
commit 6fc94fb99e38960a24ee3a3dc441f85f786a654e
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
* lisp/tab-bar.el: Use 'mouse-1' for history buttons like for 'add-tab'
button
* lisp/tab-bar.el (tab-bar-mouse-down-1, tab-bar-mouse-1):
Handle clicks for 'history-back' and 'history-forward' the same way
as 'add-tab' clicks.
---
lisp/tab-bar.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 871ed1c..ca1087e 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -284,7 +284,8 @@ existing tab."
(setq tab-bar--dragging-in-progress t)
;; Don't close the tab when clicked on the close button. Also
;; don't add new tab on down-mouse. Let `tab-bar-mouse-1' do this.
- (unless (or (eq (car item) 'add-tab) (nth 2 item))
+ (unless (or (memq (car item) '(add-tab history-back history-forward))
+ (nth 2 item))
(if (functionp (nth 1 item))
(call-interactively (nth 1 item))
(unless (eq tab-number t)
@@ -298,7 +299,8 @@ regardless of where you click on it. Also add a new tab."
(let* ((item (tab-bar--event-to-item (event-start event)))
(tab-number (tab-bar--key-to-number (nth 0 item))))
(cond
- ((and (eq (car item) 'add-tab) (functionp (nth 1 item)))
+ ((and (memq (car item) '(add-tab history-back history-forward))
+ (functionp (nth 1 item)))
(call-interactively (nth 1 item)))
((and (nth 2 item) (not (eq tab-number t)))
(tab-bar-close-tab tab-number)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 6fc94fb: * lisp/tab-bar.el: Use 'mouse-1' for history buttons like for 'add-tab' button,
Juri Linkov <=