From e2a51e497a2c1313722eb13f37aa682160021c2f Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 12 May 2022 19:27:08 +0300 Subject: Improved documentation on Toolbox's clear function --- src/Generic/ConsoleInterface/Toolbox.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Generic/ConsoleInterface/Toolbox.cpp') diff --git a/src/Generic/ConsoleInterface/Toolbox.cpp b/src/Generic/ConsoleInterface/Toolbox.cpp index 0ede126..ca83b3b 100644 --- a/src/Generic/ConsoleInterface/Toolbox.cpp +++ b/src/Generic/ConsoleInterface/Toolbox.cpp @@ -1,11 +1,13 @@ #include "Toolbox.hpp" /*! - * Prints an ANSI escape sequence to clear the console. + * Erases display and moves cursor to top left corner via ANSI escape sequences: \c ESC[2J \c ESC[1;1H + * + * \warning Not all terminals support any or all ANSI escape sequences + * + * \note Source: https://stackoverflow.com/a/52895729/12036073 */ void clear() { - // Clears console on Linux - // Source: https://stackoverflow.com/a/52895729/12036073 std::cout << u8"\033[2J\033[1;1H"; } -- cgit v1.3.1-23-gd82d