From d7eff865af9f57e2b11f089f9be26e0213a0b4fd Mon Sep 17 00:00:00 2001 From: HarrievG Date: Mon, 5 Jul 2021 10:37:29 +0200 Subject: [PATCH] - automatically scroll the console output to last line on print --- neo/tools/debugger/DebuggerWindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/neo/tools/debugger/DebuggerWindow.cpp b/neo/tools/debugger/DebuggerWindow.cpp index 8eb1c5f5..9bb24fa0 100644 --- a/neo/tools/debugger/DebuggerWindow.cpp +++ b/neo/tools/debugger/DebuggerWindow.cpp @@ -1821,10 +1821,17 @@ void rvDebuggerWindow::ProcessNetMessage ( idBitMsg* msg ) break; case DBMSG_PRINT: + { + HWND prevFocus = GetFocus(); + SetFocus ( mWndConsole ); SendMessage ( mWndConsole, EM_SETSEL, -1, -1 ); SendMessage ( mWndConsole, EM_REPLACESEL, 0, (LPARAM)(const char*)(msg->GetData()) + msg->GetReadCount() ); + SendMessage( mWndConsole, EM_SETSEL, -1, -1 ); SendMessage ( mWndConsole, EM_SCROLLCARET, 0, 0 ); + UpdateWindow( mWndConsole ); + SetFocus( prevFocus ); break; + } case DBMSG_BREAK: {