Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: dart/site/try/src/selection.dart

Issue 265063002: Better handling of large files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reviewable Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
}
}

Powered by Google App Engine
This is Rietveld 408576698