From 9248c38c8fa53ed3b2fac3cc1bf53948e23133d4 Mon Sep 17 00:00:00 2001 From: crschnick Date: Thu, 14 Nov 2024 15:04:51 +0000 Subject: [PATCH] Fix multi executes --- .../xpipe/app/browser/file/BrowserFileSystemTabModel.java | 8 ++++---- .../io/xpipe/ext/base/browser/MultiExecuteAction.java | 2 +- .../ext/base/browser/MultiExecuteSelectionAction.java | 2 +- .../io/xpipe/ext/base/browser/OpenTerminalAction.java | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSystemTabModel.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSystemTabModel.java index 35cf9b5ea..f89d4342f 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSystemTabModel.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileSystemTabModel.java @@ -281,10 +281,10 @@ public final class BrowserFileSystemTabModel extends BrowserStoreSessionTab { if (fileSystem == null) { return; @@ -547,7 +547,7 @@ public final class BrowserFileSystemTabModel extends BrowserStoreSessionTab { if (fileSystem.getShell().isPresent()) { - var dock = shouldLaunchSplitTerminal(); + var dock = shouldLaunchSplitTerminal() && dockIfPossible; var uuid = UUID.randomUUID(); terminalRequests.add(uuid); if (dock && browserModel instanceof BrowserFullSessionModel fullSessionModel && diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteAction.java index 5c742cd17..82256c61d 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteAction.java @@ -39,7 +39,7 @@ public abstract class MultiExecuteAction implements BrowserBranchAction { model.openTerminalAsync(entry.getRawFileEntry().getName(), model.getCurrentDirectory() != null ? model.getCurrentDirectory() .getPath() - : null, cmd); + : null, cmd, entries.size() == 1); } }, false); diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteSelectionAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteSelectionAction.java index 5fcd874e8..24302678a 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteSelectionAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/MultiExecuteSelectionAction.java @@ -43,7 +43,7 @@ public abstract class MultiExecuteSelectionAction implements BrowserBranchAction model.openTerminalAsync(getTerminalTitle(), model.getCurrentDirectory() != null ? model.getCurrentDirectory() .getPath() - : null, cmd); + : null, cmd, true); }, false); } diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenTerminalAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenTerminalAction.java index 3ba0c55d8..d35cfe3df 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenTerminalAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenTerminalAction.java @@ -30,7 +30,7 @@ public class OpenTerminalAction implements BrowserLeafAction { : Collections.singletonList((String) null); for (String dir : dirs) { var name = (dir != null ? dir + " - " : "") + model.getName(); - model.openTerminalAsync(name, dir, model.getFileSystem().getShell().orElseThrow()); + model.openTerminalAsync(name, dir, model.getFileSystem().getShell().orElseThrow(), dirs.size() == 1); } }