summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/tab-bar.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 69863e55ce3..5c237e7130e 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -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)