Restore clear command for the client console#5029
Open
HeresHavi wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added a built-in
clearconsolecommand for the F8 console.It clears visible and queued output while keeping command history and
console.logintact. It can also be used as/clearconsolein the chat.Motivation
MTA already had code for clearing the console, but the original command was disabled because the old GUI implementation could crash when clearing multiple lines. That problem could not be reproduced with the current console, including with large amounts of output and new lines being added continuously.
The restored implementation also clears output waiting to be displayed, preventing old lines from reappearing when the console is reopened.
For example, a developer debugging a busy resource may build up thousands of lines in the F8 console. They can now clear the visible output without losing their previous commands or the persistent log.
Test plan
Runtime
clearconsole, and confirmed all visible and queued output was removed.Builds and Tests
Debug | Win32: Client Core build passed.Release | Win32: Full solution build passed.clang-format.Checklist