Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f2d492b

Browse filesBrowse files
author
Alberto Iannaccone
authored
show represented file on MacOS (arduino#868)
1 parent 5979e5a commit f2d492b
Copy full SHA for f2d492b

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎arduino-ide-extension/src/browser/theia/workspace/workspace-service.ts

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/browser/theia/workspace/workspace-service.ts
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as remote from '@theia/core/electron-shared/@electron/remote';
12
import { injectable, inject } from 'inversify';
23
import URI from '@theia/core/lib/common/uri';
34
import { EditorWidget } from '@theia/editor/lib/browser';
@@ -77,7 +78,9 @@ export class WorkspaceService extends TheiaWorkspaceService {
7778
),
7879
]);
7980
// On Dindows, `getRecentWorkspaces` returns only file paths, not URIs as expected by the `isValid` method.
80-
const recentWorkspaces = recentWorkspacesPaths.map(e => VSCodeUri.file(e).toString());
81+
const recentWorkspaces = recentWorkspacesPaths.map((e) =>
82+
VSCodeUri.file(e).toString()
83+
);
8184
const toOpen = await new ArduinoWorkspaceRootResolver({
8285
isValid: this.isValid.bind(this),
8386
}).resolve({ hash, recentWorkspaces, recentSketches });
@@ -127,6 +130,8 @@ export class WorkspaceService extends TheiaWorkspaceService {
127130
}: FocusTracker.IChangedArgs<Widget>): void {
128131
if (newValue instanceof EditorWidget) {
129132
const { uri } = newValue.editor;
133+
const currentWindow = remote.getCurrentWindow();
134+
currentWindow.setRepresentedFilename(uri.path.toString());
130135
if (Sketch.isSketchFile(uri.toString())) {
131136
this.updateTitle();
132137
} else {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.