* lisp/menu-bar.el (showhide-tab-bar): Visible on tty too.
* lisp/tab-bar.el (tab-bar-mode): Add binding [(control shift tab)] for w32.
* lisp/tab-line.el (tab-line-add-tab): Use tmm-prompt for buffer-menu on tty.
* src/w32term.c (w32_read_socket): Fix tool-bar clicks.
(bindings--define-key menu [showhide-tab-bar]
'(menu-item "Tab Bar" toggle-tab-bar-mode-from-frame
:help "Turn tab bar on/off"
- :visible (display-graphic-p)
:button
(:toggle . (menu-bar-positive-p
(frame-parameter (menu-bar-frame-for-menubar)
default-frame-alist)))))
(when tab-bar-mode
(global-set-key [(control shift iso-lefttab)] 'tab-bar-switch-to-prev-tab)
+ (global-set-key [(control shift tab)] 'tab-bar-switch-to-prev-tab)
(global-set-key [(control tab)] 'tab-bar-switch-to-next-tab)))
(defun tab-bar-mouse (event)
(setcdr prev-tab (cons new-tab (cdr prev-tab))))))))
(set-frame-parameter nil 'tabs tabs)
(tab-bar-select-tab new-tab)
- (unless (and (display-graphic-p) tab-bar-mode)
+ (unless tab-bar-mode
(message "Added new tab with the current window configuration"))))
\f
"Create a new named window configuration without having to click a tab."
(interactive)
(tab-bar-add-tab)
- (unless (and (display-graphic-p) tab-bar-mode)
+ (unless tab-bar-mode
(message "Added new tab with the current window configuration")))
(defun delete-tab ()
"Delete the current window configuration without clicking a close button."
(interactive)
(tab-bar-close-current-tab)
- (unless (and (display-graphic-p) tab-bar-mode)
+ (unless tab-bar-mode
(message "Deleted the current tab")))
(defalias 'list-tabs 'tab-bar-list)
\f
(defun tab-line-add-tab (&optional e)
(interactive "e")
- ;; Maybe (buffer-menu-open)
- (mouse-buffer-menu e))
+ (if window-system
+ (mouse-buffer-menu e) ; like (buffer-menu-open)
+ ;; tty menu doesn't support mouse clicks, so use tmm
+ (tmm-prompt (mouse-buffer-menu-keymap))))
(defun tab-line-select-tab (&optional e)
"Switch to the selected tab.
int x = XFIXNAT (inev.x);
int y = XFIXNAT (inev.y);
- window = window_from_coordinates (f, x, y, 0, 1, 0);
+ window = window_from_coordinates (f, x, y, 0, 1, 1);
if (EQ (window, f->tab_bar_window))
{
int x = XFIXNAT (inev.x);
int y = XFIXNAT (inev.y);
- window = window_from_coordinates (f, x, y, 0, 1, 0);
+ window = window_from_coordinates (f, x, y, 0, 1, 1);
if (EQ (window, f->tool_bar_window))
{