vscode-cpptools
vscode-cpptools copied to clipboard
IntelliSense squiggles don't update correctly after an edit and cursor line change or save
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.
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.
Tested on C/C++ 1.22.0-dogfood2, this issue not repro: