File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -769,6 +769,8 @@ void newRow()
769769
770770void consolePrintChar (int c )
771771{
772+ int tabspaces ;
773+
772774 if (c == 0 ) return ;
773775
774776 switch (c ) {
@@ -786,7 +788,7 @@ void consolePrintChar(int c)
786788
787789 if (currentConsole -> cursorX < 1 ) {
788790 if (currentConsole -> cursorY > 1 ) {
789- currentConsole -> cursorX = currentConsole -> windowWidth - 1 ;
791+ currentConsole -> cursorX = currentConsole -> windowWidth ;
790792 currentConsole -> cursorY -- ;
791793 } else {
792794 currentConsole -> cursorX = 1 ;
@@ -797,7 +799,8 @@ void consolePrintChar(int c)
797799 break ;
798800
799801 case 9 :
800- currentConsole -> cursorX += currentConsole -> tabSize - ((currentConsole -> cursorX )%(currentConsole -> tabSize ));
802+ tabspaces = currentConsole -> tabSize - ((currentConsole -> cursorX - 1 ) % currentConsole -> tabSize );
803+ for (int i = 0 ; i < tabspaces ; i ++ ) consolePrintChar (' ' );
801804 break ;
802805 case 10 :
803806 newRow ();
You can’t perform that action at this time.
0 commit comments