File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
editors/code/src/commands Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ class AstInspector implements vscode.HoverProvider, Disposable {
127127 if ( ! rustTextRange ) return ;
128128
129129 this . rustEditor . setDecorations ( AstInspector . astDecorationType , [ rustTextRange ] ) ;
130+ this . rustEditor . revealRange ( rustTextRange ) ;
130131
131132 const rustSourceCode = this . rustEditor . document . getText ( rustTextRange ) ;
132133 const astTextRange = this . findAstRange ( astTextLine ) ;
@@ -145,7 +146,7 @@ class AstInspector implements vscode.HoverProvider, Disposable {
145146 const parsedRange = / \[ ( \d + ) ; ( \d + ) \) / . exec ( astLine ) ;
146147 if ( ! parsedRange ) return ;
147148
148- const [ , begin , end ] = parsedRange . map ( off => doc . positionAt ( + off ) ) ;
149+ const [ begin , end ] = parsedRange . slice ( 1 ) . map ( off => doc . positionAt ( + off ) ) ;
149150
150151 return new vscode . Range ( begin , end ) ;
151152 }
You can’t perform that action at this time.
0 commit comments