branch: elpa/helm
commit 3e0ba33224ef7fdb5a6feab6d35c96cad886a306
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Force switching to new tab even when buffer
    
    is displayed in an already existing tab (#2684).
---
 helm-buffers.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/helm-buffers.el b/helm-buffers.el
index 181c7c815b..7997b1bcce 100644
--- a/helm-buffers.el
+++ b/helm-buffers.el
@@ -982,8 +982,10 @@ tab if some, otherwise, display it in a new tab."
           (progn
             (switch-to-buffer-other-tab (car bufs))
             (helm-window-show-buffers bufs))
-        (helm-buffers-maybe-switch-to-buffer-in-tab
-         candidate #'switch-to-buffer-other-tab)))))
+        (if helm-current-prefix-arg
+            (switch-to-buffer-other-tab candidate)
+          (helm-buffers-maybe-switch-to-buffer-in-tab
+           candidate #'switch-to-buffer-other-tab))))))
 
 (helm-make-command-from-action helm-buffers-switch-to-buffer-new-tab
   "Run switch to buffer in other tab action from `helm-source-buffers-list'."

Reply via email to