Don't turn mouse-1 into mouse-2 when clicking on the tab-line (bug#49247)

* lisp/tab-line.el (tab-line-tab-name-format-default): For 'tab-line-tab-map'
add the property 'follow-link' with the value 'ignore'.
This commit is contained in:
Juri Linkov 2021-07-08 20:51:15 +03:00
parent 57354bc64b
commit 274e71f5cc
2 changed files with 6 additions and 3 deletions

View file

@ -1208,7 +1208,7 @@ overlay property, the value of that property determines what to do.
for the `follow-link' event, the binding of that event determines
what to do.
The resulting value determine whether POS is inside a link:
The resulting value determines whether POS is inside a link:
- If the value is `mouse-face', POS is inside a link if there
is a non-nil `mouse-face' property at POS. Return t in this case.
@ -2881,8 +2881,8 @@ is copied instead of being cut."
(set-marker (nth 2 state) nil))
(with-current-buffer (window-buffer window)
(setq cursor-type (nth 3 state)))))))
;;; Bindings for mouse commands.
(global-set-key [down-mouse-1] 'mouse-drag-region)

View file

@ -471,7 +471,10 @@ should return the formatted tab name to display in the tab line."
(dolist (fn tab-line-tab-face-functions)
(setf face (funcall fn tab tabs face buffer-p selected-p)))
(apply 'propertize
(concat (propertize name 'keymap tab-line-tab-map)
(concat (propertize name
'keymap tab-line-tab-map
;; Don't turn mouse-1 into mouse-2 (bug#49247)
'follow-link 'ignore)
(or (and (or buffer-p (assq 'buffer tab) (assq 'close tab))
tab-line-close-button-show
(not (eq tab-line-close-button-show