Skip to content

Commit

Permalink
fix: make plugin compatible with unplugin-auto-import (#21)
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Sytsma <tobias@leanslate.nl>
  • Loading branch information
Tobiaqs and Tobias Sytsma authored Oct 5, 2024
1 parent 7606edd commit 4d05480
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ export function activate() {
// 2. And we use VSCode built-in "Go to definition" command trigger any
// other condition's jump
else {
const importNameStart = match.index! + match[0].length - match[1].length - 1
const importNameStart = match.index! + match[0].length + 2
e.selection = new Selection(
new Position(
e.selection.anchor.line,
importNameStart,
),
new Position(
e.selection.anchor.line,
importNameStart + match[1].length,
importNameStart,
),
)
triggerDoc = undefined
Expand Down

0 comments on commit 4d05480

Please # to comment.