File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/cursorless-vscode/src/ide/vscode Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -110,14 +110,15 @@ export class VscodeIDE implements IDE {
110110 }
111111
112112 private getActiveTextEditor ( ) {
113- return window . activeTextEditor != null
113+ return window . activeTextEditor != null &&
114+ isValidEditor ( window . activeTextEditor )
114115 ? this . fromVscodeEditor ( window . activeTextEditor )
115116 : undefined ;
116117 }
117118
118119 get visibleTextEditors ( ) : VscodeTextEditorImpl [ ] {
119120 return window . visibleTextEditors
120- . filter ( ( e ) => e . document . uri . scheme !== "output" )
121+ . filter ( isValidEditor )
121122 . map ( ( e ) => this . fromVscodeEditor ( e ) ) ;
122123 }
123124
@@ -250,3 +251,7 @@ export class VscodeIDE implements IDE {
250251 return ( ) => pull ( this . extensionContext . subscriptions , ...disposables ) ;
251252 }
252253}
254+
255+ function isValidEditor ( editor : vscode . TextEditor ) : boolean {
256+ return editor . document . uri . scheme !== "output" ;
257+ }
You can’t perform that action at this time.
0 commit comments