Commit f72bb4ce authored by Juri Linkov's avatar Juri Linkov
Browse files

* lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize buffer.

* lisp/tab-bar.el (switch-to-buffer-other-tab): Use
'window-normalize-buffer-to-switch-to' on 'buffer-or-name',
like does 'pop-to-buffer' used by 'switch-to-buffer-other-frame',
instead of raising the error "Invalid buffer" on a non-existent buffer name.
parent d3e0023a
Pipeline #5716 passed with stage
in 60 minutes and 14 seconds
......@@ -1526,9 +1526,10 @@ indirectly called by the latter."
Like \\[switch-to-buffer-other-frame] (which see), but creates a new tab."
(interactive
(list (read-buffer-to-switch "Switch to buffer in other tab: ")))
(display-buffer buffer-or-name '((display-buffer-in-tab
display-buffer-same-window)
(inhibit-same-window . nil))
(display-buffer (window-normalize-buffer-to-switch-to buffer-or-name)
'((display-buffer-in-tab
display-buffer-same-window)
(inhibit-same-window . nil))
norecord))
(defun find-file-other-tab (filename &optional wildcards)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment