Skip to content

Commit 36d44f5

Browse files
committed
fix: ignore empty spans
1 parent c64cf12 commit 36d44f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

helix-core/src/syntax/span.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ impl SpanIter {
7676
use HighlightEvent::*;
7777

7878
debug_assert!(span.start <= span.end);
79+
if span.start == span.end {
80+
return;
81+
}
82+
7983
self.event_queue
8084
.push_back(HighlightStart(Highlight(span.scope)));
8185
self.range_ends.push(span.end);

0 commit comments

Comments
 (0)