-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Console.WriteLine occasionally doesn't break the line #15455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've got a crazy hunch. I think this is probably the same thing as #14512. Can you try installing Terminal Preview, v1.18, setting that as the "Default Terminal Application" in the Settings App, and try again? |
@zadjii-msft #14512 did partially help, in stackoverflow comment I mentioned this:
this issue got resolved, but my original problem the line breaks (apparently after resizing the window) is still there |
@Rand-Random this issue is triggered when resizing horizontally only, and you have output past and horizontal resize by one column: It's easy to see what happen when using hex: Before buffer resize:
and after:
Notice how |
Thanks for filing this! Gonna mark this as a duplicate of #6901 (comment) /dup #6901 |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
@zadjii-msft - not sure if you would look at a closed issue without a ping IMHO closing the issue makes the duplicate comment look like this is a completed task, as some issues in the comment aren't closed - so to me that would be confusing, I would believe looking at that #8976 and #9933 are open tasks while #15455 is completed BUT if thats how you want to do things, its totally up to you, so you do you Had some time to look at this issue again, and wanted to do a "simple" fix based on the observed behaviour, I borrowed @elsaco code and did the following internal class Program
{
static void Main(string[] args)
{
for (var i = 0; i < 3; i++)
ConsoleEx.WriteLine(i.ToString().PadRight(119 + i, 'a'));
Console.ReadKey();
}
}
internal static class ConsoleEx
{
#region Static Public Methods
public static void WriteLine(string str)
{
//try to fix
if (str.Length is >= 119 and <= 121)
str = str.PadRight(125);
Console.WriteLine(str);
}
#endregion
} the idea is if the length Sadly, this didn't help and instead of the broken state of newlines "concatenated together" I am getting the different issue described in the comment #6901 (comment) "line breaks are introduced" |
Windows Terminal version
1.16.10262.0
Windows build number
10.0.22621.1702
Other Software
No response
Steps to reproduce
I did explain the issue in detail on Stackoverflow
https://stackoverflow.com/questions/76341712
if linking to Stackoverflow isn't sufficient, please let me know.
Expected Behavior
Console.Writeline()
should always produce a new lineActual Behavior
see the stackoverflow post
The text was updated successfully, but these errors were encountered: