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

Unified Diff: lib/runtime/messages_widget.dart

Issue 1419953002: Fix the error message widget (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 2 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
« no previous file with comments | « lib/runtime/messages.css ('k') | lib/runtime/messages_widget.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/messages_widget.dart
diff --git a/lib/runtime/messages_widget.dart b/lib/runtime/messages_widget.dart
index 0d6a903aa3954461a6300b412f84e2086a598f5a..5762c577291a77f083c5cf52aaa202b6ca7d8aef 100644
--- a/lib/runtime/messages_widget.dart
+++ b/lib/runtime/messages_widget.dart
@@ -56,12 +56,12 @@ void displayMessages(String data) {
' <span class="location">${span.start.toolString}</span></div>'
' <span class="text">');
if (span is SourceSpanWithContext) {
- var context = span.context;
- sb.write(_escape(context.substring(0, span.start.column)));
+ sb.write(_escape(span.context.substring(0, span.start.column)));
sb.write('<span class="$level">');
sb.write(_escape(span.text));
sb.write('</span>');
- sb.write(_escape(context.substring(span.end.column)));
+ var end = span.start.column + span.text.length;
+ sb.write(_escape(span.context.substring(end)));
} else {
sb.write(_escape(span.text));
}
« no previous file with comments | « lib/runtime/messages.css ('k') | lib/runtime/messages_widget.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698