From 2beff2495f8c63fdaf2e4a05071ef71ad241a13e Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Tue, 3 Nov 2020 13:41:23 +0100 Subject: [PATCH] Fix backspace behavior, random printing of > --- src/Console.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Console.cpp b/src/Console.cpp index 5dd99db..3103da4 100644 --- a/src/Console.cpp +++ b/src/Console.cpp @@ -31,6 +31,7 @@ void HandleInput(const std::string& cmd){ void ProcessOut(){ static size_t len = 2; if(QConsoleOut.empty() && len == CInputBuff.length())return; + printf("%c[2K\r", 27); for(const std::string& msg : QConsoleOut) if(!msg.empty())std::cout << msg; MLock.lock(); @@ -120,7 +121,6 @@ void SetupConsole(){ HandleInput(CInputBuff); CInputBuff.clear(); }else { - printf("%c[2K\r", 27); CInputBuff += char(In); } }