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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
debug: add command to clear the terminal in the $dbg prompt #20625
Conversation
Co-authored-by: JalonSolov <JalonSolov@gmail.com>
Co-authored-by: JalonSolov <JalonSolov@gmail.com>
@@ -271,6 +274,9 @@ pub fn (mut d Debugger) interact(info DebugContextInfo) ! { | |||
} | |||
} | |||
} | |||
'clear' { | |||
term.erase_clear() |
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.
Why term.erase_clear()
, instead of term.clear()
?
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.
term.clear()
will have the same visible effect at the end, but will also allow you to scroll upwards, and see the previous lines.
With term.erase_clear()
, all the lines in the current screen are erased, and if you scroll, you will not see them, you will only see the lines that were out of sight.
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.
Good work.
I have a little OCD 馃榿, I missed cleaning the screen.