File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
arduino-ide-extension/src/browser/theia/workspace Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1+ import * as remote from '@theia/core/electron-shared/@electron/remote' ;
12import { injectable , inject } from 'inversify' ;
23import URI from '@theia/core/lib/common/uri' ;
34import { 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 {
You can’t perform that action at this time.
0 commit comments