summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/Console
diff options
context:
space:
mode:
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-08 07:31:30 +0000
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-08 07:31:30 +0000
commit51797e6dd571eacaad2a3cebdef10d284f22164e (patch)
tree518fd7b24e7c27d2acf55ce2128b641606d57cae /MdeModulePkg/Universal/Console
parent59d2a62262e832b10d72ddc15e215dc6bbcf45d6 (diff)
downloadedk2-51797e6dd571eacaad2a3cebdef10d284f22164e.tar.gz
edk2-51797e6dd571eacaad2a3cebdef10d284f22164e.tar.bz2
edk2-51797e6dd571eacaad2a3cebdef10d284f22164e.zip
Fix OutputString() in the console driver does not auto-scroll when you fill up the screen like the graphics driver does.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8811 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console')
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c
index 3c2f45bb6b..99711185a1 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c
@@ -82,6 +82,7 @@ CHAR16 mSetModeString[] = { ESC, '[', '=', '3', 'h', 0 };
CHAR16 mSetAttributeString[] = { ESC, '[', '0', 'm', ESC, '[', '4', '0', 'm', ESC, '[', '4', '0', 'm', 0 };
CHAR16 mClearScreenString[] = { ESC, '[', '2', 'J', 0 };
CHAR16 mSetCursorPositionString[] = { ESC, '[', '0', '0', ';', '0', '0', 'H', 0 };
+CHAR16 mCrLfString[] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };
//
// Body of the ConOut functions
@@ -309,6 +310,15 @@ TerminalConOutOutputString (
Mode->CursorColumn = 0;
if (Mode->CursorRow < (INT32) (MaxRow - 1)) {
Mode->CursorRow++;
+ } else {
+ //
+ // Cursor has reached at MaxRow and MaxColumn,
+ // output carriage return and line feed to scroll screen
+ // when string is not control string.
+ //
+ if (!TerminalDevice->OutputEscChar) {
+ This->OutputString (This, mCrLfString);
+ }
}
}