From e763b279a887cfc518e46b52af9c0ef0572068fc Mon Sep 17 00:00:00 2001 From: veetaha Date: Thu, 2 Apr 2020 03:24:45 +0300 Subject: [PATCH] vscode: postrefactor variable names --- editors/code/src/commands/syntax_tree.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/editors/code/src/commands/syntax_tree.ts b/editors/code/src/commands/syntax_tree.ts index c1af7122fb2..7b58cf7889e 100644 --- a/editors/code/src/commands/syntax_tree.ts +++ b/editors/code/src/commands/syntax_tree.ts @@ -189,18 +189,18 @@ class AstInspector implements vscode.HoverProvider, Disposable { provideHover(doc: vscode.TextDocument, hoverPosition: vscode.Position): vscode.ProviderResult { if (!this.rustEditor) return; - const astTextLine = doc.lineAt(hoverPosition.line); + const astFileLine = doc.lineAt(hoverPosition.line); - const rustTextRange = this.parseRustTextRange(this.rustEditor.document, astTextLine.text); - if (!rustTextRange) return; + const rustFileRange = this.parseRustTextRange(this.rustEditor.document, astFileLine.text); + if (!rustFileRange) return; - this.rustEditor.setDecorations(this.astDecorationType, [rustTextRange]); - this.rustEditor.revealRange(rustTextRange); + this.rustEditor.setDecorations(this.astDecorationType, [rustFileRange]); + this.rustEditor.revealRange(rustFileRange); - const rustSourceCode = this.rustEditor.document.getText(rustTextRange); - const astTextRange = this.findAstRange(astTextLine); + const rustSourceCode = this.rustEditor.document.getText(rustFileRange); + const astFileRange = this.findAstRange(astFileLine); - return new vscode.Hover(["```rust\n" + rustSourceCode + "\n```"], astTextRange); + return new vscode.Hover(["```rust\n" + rustSourceCode + "\n```"], astFileRange); } private findAstRange(astLine: vscode.TextLine) {