mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fixing TextFormatter unit test.
This commit is contained in:
@@ -47,7 +47,7 @@ namespace Terminal.Gui {
|
||||
set {
|
||||
text = value;
|
||||
|
||||
if (Size.Width == 0 || Size.Height == 0 || Size.Width != text.RuneCount) {
|
||||
if (text.RuneCount > 0 && (Size.Width == 0 || Size.Height == 0 || Size.Width != text.RuneCount)) {
|
||||
// Proivde a default size (width = length of longest line, height = 1)
|
||||
// TODO: It might makem more sense for the default to be width = length of first line?
|
||||
Size = new Size (TextFormatter.MaxWidth (Text, int.MaxValue), 1);
|
||||
|
||||
Reference in New Issue
Block a user