aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorveetaha <[email protected]>2020-04-02 01:24:45 +0100
committerveetaha <[email protected]>2020-04-02 09:13:38 +0100
commite763b279a887cfc518e46b52af9c0ef0572068fc (patch)
treefb4136e713dec73ae9db1c08788916e05360ee89
parentd453281bb2b5608c5655f116b7722a2514063555 (diff)
vscode: postrefactor variable names
-rw-r--r--editors/code/src/commands/syntax_tree.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/editors/code/src/commands/syntax_tree.ts b/editors/code/src/commands/syntax_tree.ts
index c1af7122f..7b58cf788 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 {
189 provideHover(doc: vscode.TextDocument, hoverPosition: vscode.Position): vscode.ProviderResult<vscode.Hover> { 189 provideHover(doc: vscode.TextDocument, hoverPosition: vscode.Position): vscode.ProviderResult<vscode.Hover> {
190 if (!this.rustEditor) return; 190 if (!this.rustEditor) return;
191 191
192 const astTextLine = doc.lineAt(hoverPosition.line); 192 const astFileLine = doc.lineAt(hoverPosition.line);
193 193
194 const rustTextRange = this.parseRustTextRange(this.rustEditor.document, astTextLine.text); 194 const rustFileRange = this.parseRustTextRange(this.rustEditor.document, astFileLine.text);
195 if (!rustTextRange) return; 195 if (!rustFileRange) return;
196 196
197 this.rustEditor.setDecorations(this.astDecorationType, [rustTextRange]); 197 this.rustEditor.setDecorations(this.astDecorationType, [rustFileRange]);
198 this.rustEditor.revealRange(rustTextRange); 198 this.rustEditor.revealRange(rustFileRange);
199 199
200 const rustSourceCode = this.rustEditor.document.getText(rustTextRange); 200 const rustSourceCode = this.rustEditor.document.getText(rustFileRange);
201 const astTextRange = this.findAstRange(astTextLine); 201 const astFileRange = this.findAstRange(astFileLine);
202 202
203 return new vscode.Hover(["```rust\n" + rustSourceCode + "\n```"], astTextRange); 203 return new vscode.Hover(["```rust\n" + rustSourceCode + "\n```"], astFileRange);
204 } 204 }
205 205
206 private findAstRange(astLine: vscode.TextLine) { 206 private findAstRange(astLine: vscode.TextLine) {