[CP] Fix missing closure code completion entries for function parameters #54112
Labels
cherry-pick-approved
Label for approved cherrypick request
devexp-server
Issues related to some aspect of the analysis server
legacy-area-analyzer
Use area-devexp instead.
merge-to-stable
Commit(s) to merge
28d9ac0
Target
stable
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/337341
Issue Description
In the latest SDK release, completions for functions/closures are missing for LSP/VS Code:
Flutter 3.13
Flutter 3.16
This was a bug introduced in eb73dba that resulted in them not having the correct
label
s set and being filtered out by the client.What is the fix
The fix is to ensure the
label
s for closure completions are not accidentally replaced by empty strings when cleaning uplabel
/filterText
in LSP (something done to improve the display of function names, parameters, signatures in code completion).This is a simple change to not split completion labels (to remove parameters/etc.) if the split character is at the start of the string (this means
foo()
would be split to keep onlyfoo
, but() =>
would not result in an empty string).Why cherry-pick
Although this is just completion and users can certainly type the function signature themselves, this feels like a significant usability regression - you'd have to hover over the parameter name to see the signature and the hover may obscure where you're typing.
This issue is being reported a lot (despite a pinned issue) 😔
It may have been reported more, but I pinned my original issue about it to try and avoid duplicates.
Risk
low
Issue link(s)
Dart-Code/Dart-Code#4837
Extra Info
(FYI @jacob314 @bwilkerson)
The text was updated successfully, but these errors were encountered: