Skip to content

Go to Symbol should position text cursor on name of target #12270

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

Closed
waderyan opened this issue Nov 15, 2016 · 7 comments
Closed

Go to Symbol should position text cursor on name of target #12270

waderyan opened this issue Nov 15, 2016 · 7 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue VS Code Tracked There is a VS Code equivalent to this issue

Comments

@waderyan
Copy link

From @chrmarti on October 31, 2016 14:48

  • VSCode Version: Code - Insiders 1.7.0-insider (0706b42, 2016-10-28T13:00:19.188Z)
  • OS Version: Darwin x64 15.6.0
  • Extensions:
Extension Author Version
EditorConfig EditorConfig 0.3.3
vscode-docker PeterJausovec 0.0.6
regex chrmarti 0.0.6
vscode-eslint dbaeumer 1.0.7
ghlink dt 0.0.4
gitlens eamodio 0.5.5
tslint eg2 0.5.39
PowerShell ms-vscode 0.7.2
csharp ms-vscode 1.4.1
debugger-for-chrome msjsdiag 2.1.0
diff rafaelmaiolla 0.0.1
kustovscode seanmcbreen 0.0.1
vscode-open-in-github sysoev 1.2.0

Steps to Reproduce:

  1. Go to Symbol that's a class or a class member (possibly others)
  2. The text cursor is positioned on the first modifier before the name

This breaks the flow of keyboard navigation for actions like Find All References, Rename Symbol, etc., because the user now has to navigate the cursor to the symbol's name first.

Copied from original issue: microsoft/vscode#14759

@waderyan waderyan self-assigned this Nov 15, 2016
@waderyan
Copy link
Author

From @rebornix on October 31, 2016 17:8

I found it share the same experience with Go To Definition.

@waderyan
Copy link
Author

From @dbaeumer on November 1, 2016 15:11

We simply use the position we get from the tsserver. So need to check what they return (using tracing option)

@waderyan
Copy link
Author

This issue was moved to #12000

@waderyan
Copy link
Author

@dbaeumer I may have migrated that issue too early. Can you clarify what you mean by

So need to check what they return (using tracing option)

Is this on our end or TypeScript's?

@waderyan
Copy link
Author

From @dbaeumer on November 4, 2016 11:18

This is on our end. I would do the following: enable tsserver tracing in VS Code's setting and do goto definition. If the trace shows that TS gives us the position of the visibility keyword (public, private, ...) then we should move this it the TS team. If not then it looks like a bug on our end.

@waderyan
Copy link
Author

Ok. This fell through the cracks but getting to it now.

I tested with this code:

class Foo {
    public x;
}

var foo = new Foo();

foo.x;

image

Here is the output I see from TS.

image

From reading this it looks like TS Server is providing the offset at the location of the public keyword rather than the target name. Can you confirm I understood the log correctly?

@waderyan
Copy link
Author

From @dbaeumer on November 15, 2016 1:3

Yes the reported offset is at the beginning of public. I recommend to ask the TS team to change this.

@waderyan waderyan added VS Code Tracked There is a VS Code equivalent to this issue and removed code-navigation labels Nov 15, 2016
@waderyan waderyan removed their assignment Nov 15, 2016
@waderyan waderyan added the Bug A bug in TypeScript label Nov 15, 2016
@mhegazy mhegazy assigned ghost Dec 14, 2016
@mhegazy mhegazy added this to the TypeScript 2.2 milestone Dec 14, 2016
@ghost ghost closed this as completed in #13367 Jan 9, 2017
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Jan 9, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

2 participants