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

Extract screen painting stuff into a separate struct #80

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

nixypanda
Copy link
Contributor

From #62 > #62 (comment)

Extracting the Painter seems to absolute clean up some clutter and makes changes to output code centralized. Full endorsement from my side.
Future thought: Maybe the Painter could also do the bookkeeping on the terminal positions regarding where the current prompt started/where the current offsets are (in this case maybe named TerminalOutput) (need to be called on resize)
With a good design it is probably reasonable to hand out exclusive references of the Painter to (plugin) components.

src/engine.rs Show resolved Hide resolved
src/painter.rs Show resolved Hide resolved
src/painter.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@sophiajt sophiajt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the refactor - this should help a lot

Had a comment about making sure we use the cached terminal size, but other than that I think this should be ready.

@nixypanda
Copy link
Contributor Author

@jonathandturner made the change you asked for.

@sophiajt
Copy link
Contributor

sophiajt commented Jul 1, 2021

Looks good!

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 this pull request may close these issues.

2 participants