Index: dart/site/try/src/selection.dart |
diff --git a/dart/site/try/src/selection.dart b/dart/site/try/src/selection.dart |
index 4ce3cce485a64186156ee69a2f574f2af7c91c50..f228026908a2219f2b0a66ea9271b3ae6fc4e938 100644 |
--- a/dart/site/try/src/selection.dart |
+++ b/dart/site/try/src/selection.dart |
@@ -35,7 +35,7 @@ class TrySelection { |
Text textNode = new Text(text.substring(start, end)); |
- if (start <= globalOffset && globalOffset < end) { |
+ if (start <= globalOffset && globalOffset <= end) { |
anchorNode = textNode; |
anchorOffset = globalOffset - start; |
} |
@@ -47,7 +47,10 @@ class TrySelection { |
void adjust(Selection selection) { |
if (anchorOffset >= 0) { |
+ Stopwatch sw = new Stopwatch()..start(); |
selection.collapse(anchorNode, anchorOffset); |
+ sw.stop(); |
+ print('selection.collapse took ${sw.elapsedMilliseconds}ms'); |
kasperl
2014/05/06 04:51:06
Sure you want to keep this in?
ahe
2014/05/06 12:54:02
Removed.
|
} |
} |