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鈥檒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

Merged
merged 3 commits into from Jan 23, 2024

Conversation

Ddiidev
Copy link
Contributor

@Ddiidev Ddiidev commented Jan 22, 2024

I have a little OCD 馃榿, I missed cleaning the screen.

vlib/v/debug/debug.v Outdated Show resolved Hide resolved
vlib/v/debug/debug.v Outdated Show resolved Hide resolved
Ddiidev and others added 2 commits January 22, 2024 03:11
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()
Copy link
Member

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() ?

Copy link
Member

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.

@spytheman spytheman changed the title debug: added command to clear screen debug: add command to clear screen in the $dbg prompt Jan 23, 2024
@spytheman spytheman changed the title debug: add command to clear screen in the $dbg prompt debug: add command to clear the terminal in the $dbg prompt Jan 23, 2024
Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Good work.

@spytheman spytheman merged commit 5b0f508 into vlang:master Jan 23, 2024
37 of 42 checks passed
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.

None yet

3 participants