Skip to content

Commit 0088e9c

Browse files
committed
fix: clicking on empty project to open in terminal does nothing
1 parent 796c9ec commit 0088e9c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/document/DocumentCommandHandlers.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1957,27 +1957,36 @@ define(function (require, exports, module) {
19571957
if (entry) {
19581958
brackets.app.openPathInFileBrowser(entry.fullPath)
19591959
.catch(err=>console.error("Error showing '" + entry.fullPath + "' in OS folder:", err));
1960+
} else {
1961+
brackets.app.openPathInFileBrowser(ProjectManager.getProjectRoot().fullPath)
1962+
.catch(err=>console.error("Error showing '" + ProjectManager.getProjectRoot().fullPath + "' in OS folder:", err));
19601963
}
19611964
}
19621965

19631966
function openDefaultTerminal() {
19641967
const entry = ProjectManager.getSelectedItem();
19651968
if (entry && entry.fullPath) {
19661969
NodeUtils.openNativeTerminal(entry.fullPath);
1970+
} else {
1971+
NodeUtils.openNativeTerminal(ProjectManager.getProjectRoot().fullPath);
19671972
}
19681973
}
19691974

19701975
function openPowerShell() {
19711976
const entry = ProjectManager.getSelectedItem();
19721977
if (entry && entry.fullPath) {
19731978
NodeUtils.openNativeTerminal(entry.fullPath, true);
1979+
} else {
1980+
NodeUtils.openNativeTerminal(ProjectManager.getProjectRoot().fullPath, true);
19741981
}
19751982
}
19761983

19771984
function openDefaultApp() {
19781985
const entry = ProjectManager.getSelectedItem();
19791986
if (entry && entry.fullPath) {
1980-
NodeUtils.openInDefaultApp(entry.fullPath, true);
1987+
NodeUtils.openInDefaultApp(entry.fullPath);
1988+
} else {
1989+
NodeUtils.openInDefaultApp(ProjectManager.getProjectRoot().fullPath);
19811990
}
19821991
}
19831992

src/styles/brackets_core_ui_variables.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
@bc-panel-bg-hover: rgba(255, 255, 255, 0.6);
109109
@bc-panel-bg-hover-alt: rgba(0, 0, 0, 0.04);
110110
@bc-panel-bg-selected: #d0d5d5;
111-
@bc-panel-bg-selected-table: #b8c9d1;
111+
@bc-panel-bg-selected-table: #cddae0;
112112
@bc-panel-bg-text-highlight: #fff;
113113
@bc-panel-border: rgba(0, 0, 0, 0.09);
114114
@bc-panel-separator: #c3c6c5;

0 commit comments

Comments
 (0)