-
Notifications
You must be signed in to change notification settings - Fork 9
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
'Add Definition' sometimes doesn't reveal the function #2
Comments
I noticed this can happen in other extensions, specifically |
Release 0.4.0 has a workaround for this issue that sets a 500ms timeout and checks if the editor actually revealed the range, and if not it will try it again. If the first one didn't work, the second one usually does. I have noticed that the second one can still fail, but this improves the issue a lot. Leaving open for now. |
The 'Add Definition' commands sometimes don't properly reveal the inserted function (The editor doesn't scroll all the way to where the function was inserted). This seems to only happen for large files with a lot of
DocumentSymbols
, and it is unclear why. I've spent a good amount of time trying to debug and fix this problem, and it doesn't seem to be a problem in the C-mantic code. TheRange
passed toTextEditor.revealRange()
is always correct, but the editor doesn't always scroll to that range. The editor does scroll in the direction of the function, but only a little bit. I haven't found consistent setup to reproduce the problem, other than that it only happens for large files. Also, this happens forms-vscode.cpptools
,clangd
, andccls
, so it doesn't seem to be a problem with the language server. I'm considering opening an issue with vscode. If I do I'll link it here.The text was updated successfully, but these errors were encountered: