| Index: pkg/analysis_services/lib/src/completion/local_computer.dart
|
| diff --git a/pkg/analysis_services/lib/src/completion/local_computer.dart b/pkg/analysis_services/lib/src/completion/local_computer.dart
|
| index a9cd972fefa7da150e2098db60a97ed1a373932f..143c9a0dbcf270775d1dcd167ebd20a97eb516ef 100644
|
| --- a/pkg/analysis_services/lib/src/completion/local_computer.dart
|
| +++ b/pkg/analysis_services/lib/src/completion/local_computer.dart
|
| @@ -178,4 +178,12 @@ class _LocalVisitor extends GeneralizingAstVisitor<dynamic> {
|
| visitNode(AstNode node) {
|
| node.parent.accept(this);
|
| }
|
| +
|
| + visitVariableDeclaration(VariableDeclaration node) {
|
| + // Do not add suggestions if editing the name in a var declaration
|
| + SimpleIdentifier name = node.name;
|
| + if (name == null || name.offset < offset || offset > name.end) {
|
| + visitNode(node);
|
| + }
|
| + }
|
| }
|
|
|