| Index: dart/site/try/src/selection.dart
|
| diff --git a/dart/site/try/src/selection.dart b/dart/site/try/src/selection.dart
|
| index a8005e6150174708cc97ccba93a545dcfc793f9c..641eb7434d4528d1ecd695f9696c5807d42656d1 100644
|
| --- a/dart/site/try/src/selection.dart
|
| +++ b/dart/site/try/src/selection.dart
|
| @@ -59,6 +59,12 @@ class TrySelection {
|
| globalOffset = computeGlobalOffset(root, anchorNode, anchorOffset);
|
| }
|
|
|
| + TrySelection copyWithRoot(Node root) {
|
| + return new TrySelection.empty(root)
|
| + ..anchorNode = anchorNode
|
| + ..anchorOffset = anchorOffset;
|
| + }
|
| +
|
| /// Computes the global offset, that is, the offset from [root].
|
| static int computeGlobalOffset(Node root, Node anchorNode, int anchorOffset) {
|
| if (anchorOffset == -1) return -1;
|
|
|