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

Navigation behaviour #1311

Closed
sbrw opened this issue Dec 5, 2017 · 3 comments
Closed

Navigation behaviour #1311

sbrw opened this issue Dec 5, 2017 · 3 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service

Comments

@sbrw
Copy link

sbrw commented Dec 5, 2017

  • Ubuntu 17.10
  • vscode 1.18.1
  • C/C++ 0.14.2
  1. Open a C-source file containing function prototypes and corresponding function definitions
  2. Navigate the file (ALT-N)
  3. The dropdown list for navigation contains both prototypes and definitions
  • Is there a way to distinguish between the prototypes and definitions in the dropdown list?
  1. Select a definition and click/hit enter
  2. Cursor jumps to the definition at a scroll position at the bottom of the screen
  • Is it possible to put the scroll position at top so the function body is displayed by default, or at least center it? I guess the most obvious reason to navigate to a function is to see its contents, and not preceeding code?
@sean-mcmanus
Copy link
Collaborator

The existence of function prototypes in the navigation list is a bug -- the intention was to only show scopes (classes, namespaces, function definitions, etc.). The definition might be the 2nd one listed, but I'm not sure if that's always the case.

We have a fix for the 2nd issue. The navigation list currently uses the "Default" of scrolling as little as possible, but we'll switch to the InCenter option. The AtTop option isn't good when you want to see the comments before a scope.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Dec 5, 2017

The 1st issue has been fixed as well for our next update -- we add the text "declaration: " to the start of declarations. Thanks for reporting these issues.

@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Dec 5, 2017
@sean-mcmanus
Copy link
Collaborator

Fixed with 0.14.4.

@sean-mcmanus sean-mcmanus removed their assignment Apr 22, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

2 participants