]> git.eshelyaron.com Git - emacs.git/commitdiff
Small fixes. Bind [tab-line mouse-1] to mouse-select-window.
authorJuri Linkov <juri@linkov.net>
Tue, 24 Sep 2019 21:54:36 +0000 (00:54 +0300)
committerJuri Linkov <juri@linkov.net>
Tue, 24 Sep 2019 21:54:36 +0000 (00:54 +0300)
lisp/mouse.el
lisp/tab-line.el
src/xdisp.c

index e947e16d47fcb16a62e4f089bb209e55f93a2425..83738895ebdc152f9a17b68b8630aedd7e0259e0 100644 (file)
@@ -2734,6 +2734,7 @@ is copied instead of being cut."
 ;; versions.
 (global-set-key [header-line down-mouse-1] 'mouse-drag-header-line)
 (global-set-key [header-line mouse-1] 'mouse-select-window)
+(global-set-key [tab-line mouse-1] 'mouse-select-window)
 ;; (global-set-key [mode-line drag-mouse-1] 'mouse-select-window)
 (global-set-key [mode-line down-mouse-1] 'mouse-drag-mode-line)
 (global-set-key [mode-line mouse-1] 'mouse-select-window)
index 169f7b8204259b77a534d4301cd95a09268dee1e..cbe418a5a2c627ec46204934b6a2599b178a3a8f 100644 (file)
@@ -260,7 +260,8 @@ using the `previous-buffer' command."
       (dotimes (_ (1+ (seq-position prev-buffers buffer)))
         (switch-to-prev-buffer window)))
      (t
-      (switch-to-buffer buffer)))))
+      (with-selected-window window
+        (switch-to-buffer buffer))))))
 
 (defun tab-line-switch-to-prev-tab (&optional e)
   "Switch to the previous tab."
index 0fc387b8ffbeb9bd45e65449e5d5edb13e205577..0e18c5adbc658f5bc42e4cbf5c3c2193b4077aaa 100644 (file)
@@ -2957,7 +2957,11 @@ init_iterator (struct it *it, struct window *w,
       else if (base_face_id == TAB_LINE_FACE_ID)
        row = MATRIX_TAB_LINE_ROW (w->desired_matrix);
       else if (base_face_id == HEADER_LINE_FACE_ID)
-       row = MATRIX_HEADER_LINE_ROW (w->desired_matrix);
+       {
+         /* Header line row depends on whether tab line is enabled.  */
+         w->desired_matrix->tab_line_p = window_wants_tab_line (w);
+         row = MATRIX_HEADER_LINE_ROW (w->desired_matrix);
+       }
     }
 
   /* Clear IT, and set it->object and other IT's Lisp objects to Qnil.