0b170c759e
VS Code uses the definition range to show a preview of the hovered item (when holding `ctrl`). We usually expand a variable declaration to the parent list so that this preview includes "var", "final" and/or any type. However, if the list contains multiple variables, this resulted in us showing other variables in the preview too which is confusing/misleading. This change keeps the original behaviour for VariableDeclarationLists with only a single variable, and otherwise keeps the specific variables range. Fixes https://github.com/Dart-Code/Dart-Code/issues/4968 Change-Id: I9e3cfd672f51040b60f9791ba89a937d5733c628 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363280 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Phil Quitslund <pquitslund@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>