Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Go to definition in TypeScript within a .vue file jumps to unrelated sections #741

Closed
3 tasks done
DanielRosenwasser opened this issue Mar 24, 2018 · 2 comments · Fixed by #748
Closed
3 tasks done

Comments

@DanielRosenwasser
Copy link
Contributor

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Windows
  • Vetur version: 0.11.7
  • VS Code version: 1.21.1
@DanielRosenwasser DanielRosenwasser changed the title Go to definition in .vue files jumps to unrelated sections Go to definition in TypeScript within .vue files jumps to unrelated sections Mar 24, 2018
@DanielRosenwasser DanielRosenwasser changed the title Go to definition in TypeScript within .vue files jumps to unrelated sections Go to definition in TypeScript within a .vue file jumps to unrelated sections Mar 24, 2018
@HerringtonDarkholme
Copy link
Member

HerringtonDarkholme commented Apr 1, 2018

I can reproduce the problem in 0.11.7. But I cannot reproduce it in master.

It should be fixed in 19e2959

The problem is previously we use getText to get source file content, but it skips all padding whitespace with which we replace template/style. Thus lookup went wrong. The fix is quite simple: using getFullText solves the problem.

@HerringtonDarkholme
Copy link
Member

BTW, findReferences should also have the same location lookup. I will fix it later.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants