| Index: runtime/observatory/lib/src/elements/script_inset.dart
|
| diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart
|
| index 024d1602ab4b64b9753df9c3b9be8af78fa0db19..41b5bd3f90eefdb33f5e948eafc4ea61613ec7d7 100644
|
| --- a/runtime/observatory/lib/src/elements/script_inset.dart
|
| +++ b/runtime/observatory/lib/src/elements/script_inset.dart
|
| @@ -416,6 +416,16 @@ class ScriptInsetElement extends ObservatoryElement {
|
| Annotation nextAnnotationOnLine(int line) {
|
| if (annotationsCursor >= annotations.length) return null;
|
| var annotation = annotations[annotationsCursor];
|
| +
|
| + // Fast-forward past any annotations before the first line that
|
| + // we are displaying.
|
| + while (annotation.line < line) {
|
| + annotationsCursor++;
|
| + if (annotationsCursor >= annotations.length) return null;
|
| + annotation = annotations[annotationsCursor];
|
| + }
|
| +
|
| + // Next annotation is for a later line, don't advance past it.
|
| if (annotation.line != line) return null;
|
| annotationsCursor++;
|
| return annotation;
|
|
|