Skip to content

Commit

Permalink
Handle the case where there is no selection(issue 32563)
Browse files Browse the repository at this point in the history
Change-Id: I5f1981a89a5af438ccc0e0b4395083ed04cda180
Reviewed-on: https://dart-review.googlesource.com/47185
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Brian Wilkerson <[email protected]>
  • Loading branch information
bwilkerson authored and [email protected] committed Mar 19, 2018
1 parent 06949dc commit 2047d44
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ class OverrideContributor implements DartCompletionContributor {
}

SourceRange selectionRange = builder.selectionRange;
if (selectionRange == null) {
return null;
}
int offsetDelta = targetId.offset + replacement.indexOf(completion);
String displayText =
displayTextBuffer.isNotEmpty ? displayTextBuffer.toString() : null;
Expand Down

0 comments on commit 2047d44

Please sign in to comment.