X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Fgui_shell_src%2Fdisplay.c;h=bb07e39f6956950772f80f7f34579da872cda65e;hb=e5deb25fdad3bf008df40679082abdc999d5d1d9;hp=065163455e0553f57783f2de531b003f443251dc;hpb=450d8178a7ef1708f69f1f3e0def83a78cbd1cee;p=tpg%2Facess2.git diff --git a/Usermode/Applications/gui_shell_src/display.c b/Usermode/Applications/gui_shell_src/display.c index 06516345..bb07e39f 100644 --- a/Usermode/Applications/gui_shell_src/display.c +++ b/Usermode/Applications/gui_shell_src/display.c @@ -79,14 +79,15 @@ void Display_AddText(int Length, const char *UTF8Text) { uint32_t cp; bytes += ReadUTF8(UTF8Text+bytes, &cp); - if( Unicode_IsPrinting(cp) ) + if( Unicode_IsPrinting(cp) ) { space --; + giCurrentCol ++; + } } Display_int_PushString(bytes, UTF8Text); UTF8Text += bytes; - _SysDebug("Length(%i) -= bytes(%i)", Length, bytes); Length -= bytes; if( Length != 0 ) { @@ -100,7 +101,7 @@ void Display_AddText(int Length, const char *UTF8Text) void Display_Newline(int bCarriageReturn) { - Display_Flush(); +// Display_Flush(); // Going down! giCurrentLine ++; @@ -146,7 +147,23 @@ void Display_SetCursor(int Row, int Col) void Display_MoveCursor(int RelRow, int RelCol) { - UNIMPLIMENTED(); + if( RelRow < 0 ) + { + for( ; RelRow < 0; RelRow ++ ) + { + uint32_t cp; + int delta = ReadUTF8Rev(gasDisplayLines[giCurrentLine], giCurrentLinePos, &cp); + if( !Unicode_IsPrinting(cp) ) + RelRow --; + else + giCurrentCol --; + giCurrentLinePos -= delta; + } + } + else + { + UNIMPLIMENTED(); + } } void Display_ClearLine(int Dir) // 0: All, 1: Forward, -1: Reverse @@ -220,8 +237,6 @@ void Display_Flush(void) AxWin3_RichText_SendLine(gMainWindow, giFirstLine + i, gasDisplayLines[line] ); gabDisplayLinesDirty[line] = 0; } - - // force redraw? AxWin3_RichText_SetCursorPos(gMainWindow, giCurrentLine, giCurrentCol); }