From 6750a033d2144fbc30f83ec673199459a11bddd7 Mon Sep 17 00:00:00 2001 From: NadnerbD Date: Tue, 31 Jan 2012 02:34:19 -0500 Subject: [PATCH 1/2] Fixed python multi-line entry by preventing double enter events --- Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp index b6c37b98..6b0b9b2e 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp @@ -540,8 +540,9 @@ void pfConsole::IHandleKey( plKeyEventMsg *msg ) static hsBool findAgain = false; static uint32_t findCounter = 0; - - if( !msg->GetKeyDown() ) + // filter out keyUps and ascii control characters + // as the control functions are handled on the keyDown event + if( !msg->GetKeyDown() || (msg->GetKeyChar() > '\0' && msg->GetKeyChar() < ' ')) return; if( msg->GetKeyCode() == KEY_ESCAPE ) From 84849b22382c1efba3336fcd196428a0dac40a68 Mon Sep 17 00:00:00 2001 From: NadnerbD Date: Tue, 31 Jan 2012 02:35:16 -0500 Subject: [PATCH 2/2] Lined up the input line with the output buffer --- Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp index 6b0b9b2e..0e028081 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfConsole.cpp @@ -1142,7 +1142,7 @@ void pfConsole::Draw( plPipeline *p ) strcpy( tmp, "]" ); drawText.DrawString( 10, y, tmp, 255, 255, 255, 255 ); - i = 10 + drawText.CalcStringWidth( tmp ) + 4; + i = 19 + drawText.CalcStringWidth( tmp ); drawText.DrawString( i, y, fWorkingLine, fConsoleTextColor ); if( fCursorTicks >= 0 )