-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
refactor(debugger): use context when drawing #6520
Conversation
1dd64fc
to
c4338c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, providing the terminal as input is very readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just saw this dangling todo
|
||
/// This is currently used to remember last scroll position so screen doesn't wiggle as much. | ||
#[derive(Default)] | ||
pub(crate) struct DrawMemory { | ||
pub(crate) current_startline: usize, | ||
// TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this todo for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was the only field that gets modified while drawing, I don't know if removing the mutation breaks the debugger since I have no idea what that code does :D
I'll address in follow-up
Motivation
Slowly untangle the draw code. Will require yet another follow-up to clean up the actual implementation to not overload the diff of this PR.
Solution
Implement the draw functions as methods on the context.