Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Commit

Permalink
Revert "Work around flow analysis bug (#59)"
Browse files Browse the repository at this point in the history
This reverts commit cc7c428.
  • Loading branch information
jakemac53 committed Sep 18, 2020
1 parent cc7c428 commit 55abeae
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/src/highlighter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,7 @@ class Highlighter {
? _primaryColor
: _secondaryColor;
var foundCurrent = false;
for (var tmp in highlightsByColumn) {
// Work around https://github.com/dart-lang/sdk/issues/43136
final highlight = tmp;
for (var highlight in highlightsByColumn) {
final startLine = highlight?.span.start.line;
final endLine = highlight?.span.end.line;
if (current != null && highlight == current) {
Expand Down Expand Up @@ -328,9 +326,9 @@ class Highlighter {
}, color: openedOnThisLineColor);
openedOnThisLine = true;
openedOnThisLineColor ??=
highlight.isPrimary ? _primaryColor : _secondaryColor;
highlight!.isPrimary ? _primaryColor : _secondaryColor;
} else if (endLine == line.number &&
highlight.span.end.column == line.text.length) {
highlight!.span.end.column == line.text.length) {
_buffer.write(highlight.label == null
? glyph.glyphOrAscii('└', '\\')
: vertical);
Expand Down

0 comments on commit 55abeae

Please sign in to comment.