Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

TypeScript renameLocation offset isn't respected #39445

Closed
DanielRosenwasser opened this issue Dec 2, 2017 · 4 comments
Closed

TypeScript renameLocation offset isn't respected #39445

DanielRosenwasser opened this issue Dec 2, 2017 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@DanielRosenwasser
Copy link
Member

function foo(x, y, z) {
    x = y = z;
}
  1. Extract function to global scope on the second line

    image

  2. Cursor is placed on line 2 col 39 instead of line 2 col 17

    image

@vscodebot vscodebot bot added the editor label Dec 2, 2017
@mjbvz mjbvz added the info-needed Issue requires more information from poster label Dec 4, 2017
@mjbvz
Copy link
Contributor

mjbvz commented Dec 4, 2017

Here's what I see:

dec-04-2017 11-04-15

What VS Code version, TS version, and OS are you on?

@DanielRosenwasser
Copy link
Member Author

VS Code 1.18.1 on Windows
TypeScript 2.6.1

@mjbvz
Copy link
Contributor

mjbvz commented Dec 5, 2017

Thanks. Only seems to happen on windows for me. Line endings don't seem to make a difference

@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Dec 5, 2017
@mjbvz
Copy link
Contributor

mjbvz commented Dec 5, 2017

I bet it's a path casing issue. Before triggering the rename, we do a quick check to make sure the active editor is the same one that triggered the refactor. This just compares the two paths

@mjbvz mjbvz added this to the November 2017 milestone Dec 5, 2017
@mjbvz mjbvz closed this as completed in 797b8fe Dec 5, 2017
@octref octref added the verified Verification succeeded label Dec 6, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants