diff options
| author | Juri Linkov | 2021-11-18 19:36:42 +0200 |
|---|---|---|
| committer | Juri Linkov | 2021-11-18 19:36:42 +0200 |
| commit | 6fc94fb99e38960a24ee3a3dc441f85f786a654e (patch) | |
| tree | ea8f53474b34b0473feccb3dc6632b7811897438 | |
| parent | 5eeaf857678d617560efa6a99bb6fd54c0ceddec (diff) | |
| download | emacs-6fc94fb99e38960a24ee3a3dc441f85f786a654e.tar.gz emacs-6fc94fb99e38960a24ee3a3dc441f85f786a654e.zip | |
* 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.
| -rw-r--r-- | lisp/tab-bar.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 871ed1c9817..ca1087e827d 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el | |||
| @@ -284,7 +284,8 @@ existing tab." | |||
| 284 | (setq tab-bar--dragging-in-progress t) | 284 | (setq tab-bar--dragging-in-progress t) |
| 285 | ;; Don't close the tab when clicked on the close button. Also | 285 | ;; Don't close the tab when clicked on the close button. Also |
| 286 | ;; don't add new tab on down-mouse. Let `tab-bar-mouse-1' do this. | 286 | ;; don't add new tab on down-mouse. Let `tab-bar-mouse-1' do this. |
| 287 | (unless (or (eq (car item) 'add-tab) (nth 2 item)) | 287 | (unless (or (memq (car item) '(add-tab history-back history-forward)) |
| 288 | (nth 2 item)) | ||
| 288 | (if (functionp (nth 1 item)) | 289 | (if (functionp (nth 1 item)) |
| 289 | (call-interactively (nth 1 item)) | 290 | (call-interactively (nth 1 item)) |
| 290 | (unless (eq tab-number t) | 291 | (unless (eq tab-number t) |
| @@ -298,7 +299,8 @@ regardless of where you click on it. Also add a new tab." | |||
| 298 | (let* ((item (tab-bar--event-to-item (event-start event))) | 299 | (let* ((item (tab-bar--event-to-item (event-start event))) |
| 299 | (tab-number (tab-bar--key-to-number (nth 0 item)))) | 300 | (tab-number (tab-bar--key-to-number (nth 0 item)))) |
| 300 | (cond | 301 | (cond |
| 301 | ((and (eq (car item) 'add-tab) (functionp (nth 1 item))) | 302 | ((and (memq (car item) '(add-tab history-back history-forward)) |
| 303 | (functionp (nth 1 item))) | ||
| 302 | (call-interactively (nth 1 item))) | 304 | (call-interactively (nth 1 item))) |
| 303 | ((and (nth 2 item) (not (eq tab-number t))) | 305 | ((and (nth 2 item) (not (eq tab-number t))) |
| 304 | (tab-bar-close-tab tab-number))))) | 306 | (tab-bar-close-tab tab-number))))) |