@@ -309,7 +309,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
309309 if ( ! currentWindowsState . lastActiveWindow ) {
310310 let activeWindow = this . getLastActiveWindow ( ) ;
311311 if ( ! activeWindow || activeWindow . isExtensionDevelopmentHost ) {
312- activeWindow = WindowsManager . WINDOWS . filter ( w => ! w . isExtensionDevelopmentHost ) [ 0 ] ;
312+ activeWindow = WindowsManager . WINDOWS . filter ( window => ! window . isExtensionDevelopmentHost ) [ 0 ] ;
313313 }
314314
315315 if ( activeWindow ) {
@@ -318,7 +318,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
318318 }
319319
320320 // 2.) Find extension host window
321- const extensionHostWindow = WindowsManager . WINDOWS . filter ( w => w . isExtensionDevelopmentHost && ! w . isExtensionTestHost ) [ 0 ] ;
321+ const extensionHostWindow = WindowsManager . WINDOWS . filter ( window => window . isExtensionDevelopmentHost && ! window . isExtensionTestHost ) [ 0 ] ;
322322 if ( extensionHostWindow ) {
323323 currentWindowsState . lastPluginDevelopmentHostWindow = this . toWindowState ( extensionHostWindow ) ;
324324 }
@@ -329,7 +329,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
329329 // so if we ever want to persist the UI state of the last closed window (window count === 1), it has
330330 // to come from the stored lastClosedWindowState on Win/Linux at least
331331 if ( this . getWindowCount ( ) > 1 ) {
332- currentWindowsState . openedWindows = WindowsManager . WINDOWS . filter ( w => ! w . isExtensionDevelopmentHost ) . map ( w => this . toWindowState ( w ) ) ;
332+ currentWindowsState . openedWindows = WindowsManager . WINDOWS . filter ( window => ! window . isExtensionDevelopmentHost ) . map ( window => this . toWindowState ( window ) ) ;
333333 }
334334
335335 // Persist
@@ -456,7 +456,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
456456
457457 // 1.) focus last active window if we are not instructed to open any paths
458458 if ( focusLastActive ) {
459- const lastActiveWindow = usedWindows . filter ( w => w . backupPath === this . windowsState . lastActiveWindow ! . backupPath ) ;
459+ const lastActiveWindow = usedWindows . filter ( window => window . backupPath === this . windowsState . lastActiveWindow ! . backupPath ) ;
460460 if ( lastActiveWindow . length ) {
461461 lastActiveWindow [ 0 ] . focus ( ) ;
462462 focusLastOpened = false ;
@@ -490,7 +490,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
490490
491491 // Remember in recent document list (unless this opens for extension development)
492492 // Also do not add paths when files are opened for diffing, only if opened individually
493- if ( ! usedWindows . some ( w => w . isExtensionDevelopmentHost ) && ! openConfig . diffMode && ! openConfig . noRecentEntry ) {
493+ if ( ! usedWindows . some ( window => window . isExtensionDevelopmentHost ) && ! openConfig . diffMode && ! openConfig . noRecentEntry ) {
494494 const recents : IRecent [ ] = [ ] ;
495495 for ( let pathToOpen of pathsToOpen ) {
496496 if ( pathToOpen . workspace ) {
@@ -556,7 +556,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
556556 const fileToCheck = fileInputs . filesToOpenOrCreate [ 0 ] || fileInputs . filesToDiff [ 0 ] ;
557557
558558 // only look at the windows with correct authority
559- const windows = WindowsManager . WINDOWS . filter ( w => w . remoteAuthority === fileInputs ! . remoteAuthority ) ;
559+ const windows = WindowsManager . WINDOWS . filter ( window => window . remoteAuthority === fileInputs ! . remoteAuthority ) ;
560560
561561 const bestWindowOrFolder = findBestWindowOrFolderForFile ( {
562562 windows,
@@ -1599,7 +1599,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
15991599 }
16001600
16011601 getLastActiveWindowForAuthority ( remoteAuthority : string | undefined ) : ICodeWindow | undefined {
1602- return getLastActiveWindow ( WindowsManager . WINDOWS . filter ( w => w . remoteAuthority === remoteAuthority ) ) ;
1602+ return getLastActiveWindow ( WindowsManager . WINDOWS . filter ( window => window . remoteAuthority === remoteAuthority ) ) ;
16031603 }
16041604
16051605 openNewWindow ( context : OpenContext , options ?: INewWindowOptions ) : ICodeWindow [ ] {
@@ -1642,13 +1642,13 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
16421642 }
16431643
16441644 sendToAll ( channel : string , payload ?: any , windowIdsToIgnore ?: number [ ] ) : void {
1645- WindowsManager . WINDOWS . forEach ( w => {
1646- if ( windowIdsToIgnore && windowIdsToIgnore . indexOf ( w . id ) >= 0 ) {
1647- return ; // do not send if we are instructed to ignore it
1645+ for ( const window of WindowsManager . WINDOWS ) {
1646+ if ( windowIdsToIgnore && windowIdsToIgnore . indexOf ( window . id ) >= 0 ) {
1647+ continue ; // do not send if we are instructed to ignore it
16481648 }
16491649
1650- w . sendWhenReady ( channel , payload ) ;
1651- } ) ;
1650+ window . sendWhenReady ( channel , payload ) ;
1651+ }
16521652 }
16531653
16541654 getFocusedWindow ( ) : ICodeWindow | undefined {
@@ -1661,7 +1661,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
16611661 }
16621662
16631663 getWindowById ( windowId : number ) : ICodeWindow | undefined {
1664- const res = WindowsManager . WINDOWS . filter ( w => w . id === windowId ) ;
1664+ const res = WindowsManager . WINDOWS . filter ( window => window . id === windowId ) ;
16651665 if ( res && res . length === 1 ) {
16661666 return res [ 0 ] ;
16671667 }
0 commit comments