File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -96,10 +96,11 @@ export default class LintManager {
9696 async runLintTool ( ) {
9797 // Check for language id
9898 this . logger . info ( 'Executing runLintTool()' ) ;
99- let lang : string = vscode . window . activeTextEditor . document . languageId ;
99+ const editor = vscode . window . activeTextEditor ;
100100 if (
101- vscode . window . activeTextEditor === undefined ||
102- ( lang !== 'verilog' && lang !== 'systemverilog' )
101+ ! editor ||
102+ ( editor . document . languageId !== 'verilog' &&
103+ editor . document . languageId !== 'systemverilog' )
103104 ) {
104105 vscode . window . showErrorMessage ( 'Verilog-HDL/SystemVerilog: No document opened' ) ;
105106 return ;
@@ -151,8 +152,8 @@ export default class LintManager {
151152 }
152153 this . logger . info ( 'Using ' + linter . name + ' linter' ) ;
153154
154- linter . removeFileDiagnostics ( vscode . window . activeTextEditor . document ) ;
155- linter . startLint ( vscode . window . activeTextEditor . document ) ;
155+ linter . removeFileDiagnostics ( editor . document ) ;
156+ linter . startLint ( editor . document ) ;
156157 }
157158 ) ;
158159 }
You can’t perform that action at this time.
0 commit comments