a23c3e3c81
Previously, if a diagnostic context spanned multiple lines, any lines which did not overlap with the highlight range would be displayed as blank. This commit fixes the bug. The problem was caused by the unconditional use of `PartitionAround` to split the line into before/highlighted/after ranges. When two ranges don't overlap, this method returns empty ranges, which results in a blank line. Instead, we first check if the ranges do overlap, and if not we print the entire line from the context. |
||
---|---|---|
.. | ||
diagnostic.go | ||
diagnostic_test.go | ||
diff.go | ||
diff_test.go | ||
format.go | ||
object_id.go | ||
object_id_test.go | ||
state.go | ||
state_test.go |