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 {
1010 Uri ,
1111 ExtensionContext ,
1212 workspace ,
13- TextEditor ,
14- TextEditorRevealType ,
15- Selection ,
16- TextDocument ,
13+ Range ,
14+ Position
1715} from 'vscode'
1816const dlv = require ( 'dlv' )
1917const mkdirp = require ( 'mkdirp' )
@@ -310,16 +308,11 @@ export function registerConfigExplorer({
310308 if ( JSON . stringify ( result . key ) !== JSON . stringify ( key ) ) return
311309 emitter . off ( 'tailwindcss/foundDefinition' , handle )
312310
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+ ) ,
323316 } )
324317 }
325318 emitter . on ( 'tailwindcss/foundDefinition' , handle )
You can’t perform that action at this time.
0 commit comments