mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-29 10:21:01 -06:00
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_test.go | ||
diagnostic.go | ||
diff_test.go | ||
diff.go | ||
format.go | ||
object_id_test.go | ||
object_id.go | ||
state_test.go | ||
state.go |