From c82f15895f1a46fa54aaf80509eb8e91c1314e23 Mon Sep 17 00:00:00 2001 From: mpohoreski Date: Tue, 14 Jul 2009 17:50:00 +0000 Subject: [PATCH] 2.6.1.35 Page Up/Down of console history while editing --- source/Debugger_Display.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source/Debugger_Display.cpp b/source/Debugger_Display.cpp index eca24b1c..f5a34419 100644 --- a/source/Debugger_Display.cpp +++ b/source/Debugger_Display.cpp @@ -647,7 +647,7 @@ void DebuggerPrint ( int x, int y, const char *pText ) } } - +//=========================================================================== void DebuggerPrintColor( int x, int y, const conchar_t * pText ) { int nLeft = x; @@ -655,6 +655,9 @@ void DebuggerPrintColor( int x, int y, const conchar_t * pText ) conchar_t g; const conchar_t *pSrc = pText; + if( !pText) + return; + while (g = (*pSrc)) { if (g == '\n') @@ -1152,7 +1155,7 @@ void DrawConsoleCursor () } //=========================================================================== -void GetConsoleRect( const int y, RECT & rect ) +void GetConsoleRect ( const int y, RECT & rect ) { int nLineHeight = GetConsoleLineHeightPixels(); @@ -1170,7 +1173,7 @@ void GetConsoleRect( const int y, RECT & rect ) } //=========================================================================== -void DrawConsoleLine( const conchar_t * pText, int y ) +void DrawConsoleLine ( const conchar_t * pText, int y ) { if (y < 0) return; @@ -2719,6 +2722,12 @@ void DrawSubWindow_Console (Update_t bUpdate) DebuggerSetColorFG( DebuggerGetColor( FG_CONSOLE_OUTPUT )); DrawConsoleLine( g_aConsoleDisplay[ iLine ], y ); } + else + { + // bugfix: 2.6.1.34 + // scrolled past top of console... Draw blank line + DrawConsoleLine( NULL, y ); + } iLine++; }