brendanzab / codespan

Beautiful diagnostic reporting for text-based programming languages.
Apache License 2.0
1.08k stars 58 forks source link

Trim or wrap line when it does not fit on the screen #364

Open RGBCube opened 2 months ago

RGBCube commented 2 months ago

image

Currently, when a line is too long, this happens.

Would be nice if it was wrapped/trimmed in places far away from the index, so it would render well in the width of the terminal (can be measured using the tput cols command, there probably is a way to get it in Rust too).