Open Gnbrkm41 opened 1 year ago
@Gnbrkm41 The suggested solutions so far were:
Console.WriteLine
instead of AnsiConsole.WriteLine
(recommended)int.MaxValue
as Column width (NOT recommended)
var width = AnsiConsole.Profile.Width;
AnsiConsole.Profile.Width = int.MaxValue;
AnsiConsole.MarkupLine(content);
AnsiConsole.Profile.Width = width;
My personal suggestion would be a markup
option:
AnsiConsole.Markup("[nobr]a very long string[/]");
or an options object as extra parameter or as default:
var options = new AnsiConsoleOptions() {
NoBreak = true
};
AnsiConsole.DefaultOptions = options;
AnsiConsole.WriteLine("....", options);
The suggested solutions so far were:
I've used another workaround by wrapping render element with custom IRenderable
that override Measure
/ Render
methods.
Downside of this workaround is when using link/decoration affected to the end of the console.
(I've confirmed that problems when changing Windows Terminal's size dynamically)
Title says all; It's kind of annoying when you print long single-line strings and copy & paste it somewhere else, only to find that the string is not single line anymore.
Note that this is essentially a duplicate of #845, but since the original issue is marked as closed I am reopening another issue to hopefully get any suggestions to get around this. Since I'm on the latest preview and am experiencing this... I guess the issue still remains as is?
Please upvote :+1: this issue if you are interested in it.