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

ellipsize overly long statements #42

Closed
drahnr opened this issue Jun 18, 2020 · 2 comments
Closed

ellipsize overly long statements #42

drahnr opened this issue Jun 18, 2020 · 2 comments
Assignees
Labels
bug Something isn't working good first issue 🔰 Good for newcomers
Milestone

Comments

@drahnr
Copy link
Owner

drahnr commented Jun 18, 2020

Summary

When a individual line is longer than the terminal size, it should be ellipsized with .... Should probably be part of LiteralSet's fmt::Display impl.

Relevant files: literal*.rs

@drahnr drahnr added bug Something isn't working good first issue 🔰 Good for newcomers labels Jun 18, 2020
@laysauchoa
Copy link
Collaborator

laysauchoa commented Jun 20, 2020

Please, assignee to me if no one is working on it. I need some time to understand the code though.

This shall be modified: fmt::Display
Can you point me where to find more info about terminal size in the code? Thank you!

@drahnr
Copy link
Owner Author

drahnr commented Jun 20, 2020

the right impl is the suggestion, since that is what is shown to the user :)

impl<'s> fmt::Display for Suggestion<'s> {
is the implementation that's supposed to be adapted, the crate being used should have functionality to determine the size, if not, crossterm has it for sure, but itmight be a bit of an overkill for that and would introduce more complexity than needed

@drahnr drahnr changed the title ellipsize over long statements ellipsize overly long statements Jun 21, 2020
@drahnr drahnr added this to the v0.3.0 milestone Jul 14, 2020
@drahnr drahnr linked a pull request Jul 21, 2020 that will close this issue
3 tasks
@drahnr drahnr closed this as completed in ca492ee Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue 🔰 Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants