From 2611b24a556e7881ef218e92b3ffc09a81339990 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 9 Sep 2013 13:32:59 +0800 Subject: [PATCH] Usermode/GUI Terminal - Moved End-of-row newline to before a write is attempted --- Usermode/Applications/gui_terminal_src/display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); - } } } -- 2.20.1