mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
terminal: use parent directory path in "Open in Terminal" action (IDEA-265230)
GitOrigin-RevId: 21bb0f5d350f9fa4acab564e8c11c0640d34e147
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ac87d0cfac
commit
30f600c244
@@ -447,8 +447,9 @@ public final class TerminalView implements Disposable {
|
||||
|
||||
public void openTerminalIn(@Nullable VirtualFile fileToOpen) {
|
||||
TerminalTabState state = new TerminalTabState();
|
||||
if (fileToOpen != null) {
|
||||
state.myWorkingDirectory = fileToOpen.getPath();
|
||||
VirtualFile parentDirectory = fileToOpen != null ? fileToOpen.getParent() : null;
|
||||
if (parentDirectory != null) {
|
||||
state.myWorkingDirectory = parentDirectory.getPath();
|
||||
}
|
||||
createNewSession(myTerminalRunner, state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user