Skip to content

Commit e763b27

Browse files
committed
vscode: postrefactor variable names
1 parent d453281 commit e763b27

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

editors/code/src/commands/syntax_tree.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,18 @@ class AstInspector implements vscode.HoverProvider, Disposable {
189189
provideHover(doc: vscode.TextDocument, hoverPosition: vscode.Position): vscode.ProviderResult<vscode.Hover> {
190190
if (!this.rustEditor) return;
191191

192-
const astTextLine = doc.lineAt(hoverPosition.line);
192+
const astFileLine = doc.lineAt(hoverPosition.line);
193193

194-
const rustTextRange = this.parseRustTextRange(this.rustEditor.document, astTextLine.text);
195-
if (!rustTextRange) return;
194+
const rustFileRange = this.parseRustTextRange(this.rustEditor.document, astFileLine.text);
195+
if (!rustFileRange) return;
196196

197-
this.rustEditor.setDecorations(this.astDecorationType, [rustTextRange]);
198-
this.rustEditor.revealRange(rustTextRange);
197+
this.rustEditor.setDecorations(this.astDecorationType, [rustFileRange]);
198+
this.rustEditor.revealRange(rustFileRange);
199199

200-
const rustSourceCode = this.rustEditor.document.getText(rustTextRange);
201-
const astTextRange = this.findAstRange(astTextLine);
200+
const rustSourceCode = this.rustEditor.document.getText(rustFileRange);
201+
const astFileRange = this.findAstRange(astFileLine);
202202

203-
return new vscode.Hover(["```rust\n" + rustSourceCode + "\n```"], astTextRange);
203+
return new vscode.Hover(["```rust\n" + rustSourceCode + "\n```"], astFileRange);
204204
}
205205

206206
private findAstRange(astLine: vscode.TextLine) {

0 commit comments

Comments
 (0)