I think this is a bug, but why when the new Console.WriteLine("Test"); appears, there is sometimes some text in addition:
does this happen every time
@zarlo not every time :/
In Windows .net console programs such effects are common, when you use the console in multiple threads concurrently. Here it seems to be a problem with scrolling the console contents in parallel with outputting some text to it.
And how can I solve it @Lercher ?
why do you need to do console.writeline("test") anyway
@DjAlEx234 to do commands, here in the screenshot "help" to see all other commands !
@Lercher The problem is not scrolling but yes how log the string is. I tested
That is does it happens when you do Console.WriteLine() in a for loop?
@fanoI it happens when a string is superior than 40 characters.
Edit: I modified public override UInt16 Cols { get { return 80; } } to public override UInt16 Cols { get { return 40; } } in TextScreen.cs and I can see it is really at the half of columns (80 col by default) that console bug...
Good catch!
So it seems that in some part of the Console.Write() code there is a wrong Cols / 2...
The problem should be here:
https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.System/Console.cs#L72
or more probably here (why there is multiplication by 2?):
https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.HAL/TextScreen.cs#L71
well try to "play" with it, I think you are closer to find the bug!
Anyone got any solutions for this?
@Arawn-Davies no :/
dang :/ what could it be? is it like when the WriteLine string is more than 80? or 40? or what :/
The bug happens when the string is longer than the half of the "console" columns (80 columns).
ah, whats the current console size? 80x25?
I've seen this on my Linux distribution. This seems to be a default problem with OSes.
Did you fix this ?
I pushed a fix for this bug to the netcore branch, it should be working now.
It is working ! :D
Most helpful comment
@Lercher The problem is not scrolling but yes how log the string is. I tested