Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support collapsing multi line output #125

Closed
Kampfkarren opened this issue Oct 1, 2019 · 2 comments · Fixed by #257
Closed

Support collapsing multi line output #125

Kampfkarren opened this issue Oct 1, 2019 · 2 comments · Fixed by #257

Comments

@Kampfkarren
Copy link

Love the library, but there's an issue when using it with long multi-line spans--it shows every line!

I believe the lines that would need to be changed are these:

for line_index in ((start.line.to_usize() + 1)..end.line.to_usize())
.map(|i| LineIndex::from(i as u32))
{

image

rustc, on the other hand, will collapse multiple line spans:

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=0d4c7f47b06cefb15528f7106766d5f7

image

Does codespan support this?

@brendanzab
Copy link
Owner

Oooh, this would definitely be a good idea! No, it's not supported yet - we'll have to add this.

@brendanzab
Copy link
Owner

I'm thinking that this will probably have to be added after #100 - I don't want to make the logic too confusing before I implement rendering overlapped labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants