]> git.eshelyaron.com Git - emacs.git/commit
Support mouse events clicked on the tab bar but outside of any tab (bug#41343)
authorJuri Linkov <juri@linkov.net>
Mon, 13 Sep 2021 08:14:32 +0000 (11:14 +0300)
committerJuri Linkov <juri@linkov.net>
Mon, 13 Sep 2021 08:15:10 +0000 (11:15 +0300)
commitfd1379a85aafa77c119b9b7aa811f669c575bac7
tree0b293aa0e8f1d55881e465e9e7748b8e9d978542
parent4ee8b4d225176191bc0778ab9cbe5bb481d4704c
Support mouse events clicked on the tab bar but outside of any tab (bug#41343)

* lisp/tab-bar.el (tab-bar--key-to-number): Return non-nil non-numeric t
when no tab is used.  Return nil for current-tab.
(tab-bar-mouse-select-tab, tab-bar-mouse-close-tab): Do nothing
when tab-bar--key-to-number returns non-nil non-numeric t
for click events outside of any tab.
(tab-bar-mouse-context-menu): Add context menu when mouse is clicked
outside of tabs.  Add "Duplicate" alongside with "Close" to the menu
used when mouse is clicked on a tab.
(toggle-tab-bar-mode-from-frame, toggle-frame-tab-bar): Move code
closer to 'tab-bar-show'.

* src/xdisp.c (handle_tab_bar_click): Return Qtab_bar with empty list
when mouse is clicked on the tab bar but outside of any tab.
lisp/tab-bar.el
src/xdisp.c