From: John Hodge Date: Mon, 9 Sep 2013 05:32:59 +0000 (+0800) Subject: Usermode/GUI Terminal - Moved End-of-row newline to before a write is attempted X-Git-Tag: rel0.15~238 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=2611b24a556e7881ef218e92b3ffc09a81339990;p=tpg%2Facess2.git Usermode/GUI Terminal - Moved End-of-row newline to before a write is attempted --- diff --git a/Usermode/Applications/gui_terminal_src/display.c b/Usermode/Applications/gui_terminal_src/display.c index 6d23898a..340cbecf 100644 --- a/Usermode/Applications/gui_terminal_src/display.c +++ b/Usermode/Applications/gui_terminal_src/display.c @@ -179,15 +179,15 @@ void Display_AddText(tTerminal *Term, size_t Length, const char *UTF8Text) _SysDebug("%i '%.*s'", Length, Length, UTF8Text); while( Length > 0 ) { + if( Term->CursorCol == Term->ViewCols ) { + Display_Newline(Term, 1); + } size_t used = Display_int_PushCharacter(Term, Length, UTF8Text); Length -= used; UTF8Text += used; Term->CursorCol ++; - if( Term->CursorCol == Term->ViewCols ) { - Display_Newline(Term, 1); - } } }