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

IntelliSense squiggles don't update correctly after an edit and cursor line change or save #12175

Closed
sean-mcmanus opened this issue Apr 9, 2024 · 2 comments
Assignees
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service regression A bug that didn't exist in a previous release
Milestone

Comments

@sean-mcmanus
Copy link
Contributor

Use code

void func() {
	std::vector<int> a;
}

Add #include <vector> via typing, pasting, or the Add include code action. Afterwards, move the cursor to a new line and/or save.

Bug: IntelliSense does not update to remove the squiggles. It updated after the cursor change lines or the file was saved with 1.18.5.

image

@sean-mcmanus sean-mcmanus added bug Language Service regression A bug that didn't exist in a previous release labels Apr 9, 2024
@Colengms
Copy link
Contributor

Colengms commented Apr 9, 2024

I'm seeing some strange behavior here. In the following video, I'm able to go from a no-repro state, to an 'every-other' repro state, simply by varying the number of lines being pasted in along with the #include statement. It also adds logging, so we can see that we're definitely specifying 'false' for suppression of preparse.

https://github.com/microsoft/vscode-cpptools/assets/49173979/a9a5304e-3dde-4819-82f6-3ba128e3444c
(repro starts at 1:14)

We think this is an issue in edg/edge. It may not have repro'ed prior to adding progressive updating of IntelliSense, due to the monolithic nature of that update. With progressive updating, we're (by design) only setting 'suppress_preparse` to false on the first of multiple calls. We think that perhaps this flag is not properly implemented, resulting in suppression of preparse working, but edge failing to retain knowledge that a suppressed preparse is still needed, then failing to do that preparse on the subsequent operation.

Furthermore, the repro in the video would seem to suggest that it's retaining some stale information about the location of the fragment containing the squiggles, as they are update properly as long as the fragment does not get moved to outside its original range.

@bobbrow bobbrow added this to cpptools Jun 17, 2024
@github-project-automation github-project-automation bot moved this to Triage in cpptools Jun 17, 2024
@bobbrow bobbrow removed the status in cpptools Jun 20, 2024
@v-ericawu
Copy link

Tested on C/C++ 1.22.0-dogfood2, this issue not repro:
image

@sean-mcmanus sean-mcmanus added this to the 1.22 milestone Oct 3, 2024
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Oct 3, 2024
@sean-mcmanus sean-mcmanus moved this to Done in cpptools Oct 3, 2024
@sean-mcmanus sean-mcmanus modified the milestones: 1.22, 1.22.8 Oct 9, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2024
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 regression A bug that didn't exist in a previous release
Projects
Status: Done
Development

No branches or pull requests

3 participants