File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed
packages/tailwindcss-vscode/src/configExplorer Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,8 @@ import {
10
10
Uri ,
11
11
ExtensionContext ,
12
12
workspace ,
13
- TextEditor ,
14
- TextEditorRevealType ,
15
- Selection ,
16
- TextDocument ,
13
+ Range ,
14
+ Position
17
15
} from 'vscode'
18
16
const dlv = require ( 'dlv' )
19
17
const mkdirp = require ( 'mkdirp' )
@@ -310,16 +308,11 @@ export function registerConfigExplorer({
310
308
if ( JSON . stringify ( result . key ) !== JSON . stringify ( key ) ) return
311
309
emitter . off ( 'tailwindcss/foundDefinition' , handle )
312
310
313
- workspace . openTextDocument ( result . file ) . then ( ( doc : TextDocument ) => {
314
- window . showTextDocument ( doc ) . then ( ( editor : TextEditor ) => {
315
- editor . revealRange ( result . range , TextEditorRevealType . InCenter )
316
- editor . selection = new Selection (
317
- result . range . start . line ,
318
- result . range . start . character ,
319
- result . range . end . line ,
320
- result . range . end . character
321
- )
322
- } )
311
+ window . showTextDocument ( Uri . file ( result . file ) , {
312
+ selection : new Range (
313
+ new Position ( result . range . start . line , result . range . start . character ) ,
314
+ new Position ( result . range . end . line , result . range . end . character ) ,
315
+ ) ,
323
316
} )
324
317
}
325
318
emitter . on ( 'tailwindcss/foundDefinition' , handle )
You can’t perform that action at this time.
0 commit comments