Skip to content

Commit 6a924da

Browse files
author
Akos Kitta
committed
Can close non-root sketch file editors.
Signed-off-by: Akos Kitta <[email protected]>
1 parent 6acffdc commit 6a924da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: arduino-ide-extension/src/browser/theia/core/widget-manager.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
CurrentSketch,
1414
SketchesServiceClientImpl,
1515
} from '../../../common/protocol/sketches-service-client-impl';
16-
import { Sketch } from '../../contributions/contribution';
1716

1817
@injectable()
1918
export class WidgetManager extends TheiaWidgetManager {
@@ -47,7 +46,8 @@ export class WidgetManager extends TheiaWidgetManager {
4746
...widgets: Widget[]
4847
): void {
4948
const sketchFileUris =
50-
CurrentSketch.isValid(sketch) && new Set(Sketch.uris(sketch));
49+
CurrentSketch.isValid(sketch) &&
50+
new Set([sketch.mainFileUri, ...sketch.rootFolderFileUris]);
5151
for (const widget of widgets) {
5252
if (widget instanceof OutputWidget) {
5353
this.setWidgetUncloseable(widget); // TODO: https://arduino.slack.com/archives/C01698YT7S4/p1598011990133700

0 commit comments

Comments
 (0)