From c6a9021f2ed44fbf0ce0712759089eb2b5103531 Mon Sep 17 00:00:00 2001 From: Tig Date: Fri, 19 Jul 2024 16:07:14 -0600 Subject: [PATCH] Fixed error in Textformatter --- Terminal.Gui/Text/TextFormatter.cs | 2 +- Terminal.Gui/Views/CheckBox.cs | 21 --------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/Terminal.Gui/Text/TextFormatter.cs b/Terminal.Gui/Text/TextFormatter.cs index 0ffbd7070..e3458afe9 100644 --- a/Terminal.Gui/Text/TextFormatter.cs +++ b/Terminal.Gui/Text/TextFormatter.cs @@ -1967,7 +1967,7 @@ public class TextFormatter /// The index of the text that fit the width. public static int GetLengthThatFits (string text, int width, int tabWidth = 0, TextDirection textDirection = TextDirection.LeftRight_TopBottom) { - return GetLengthThatFits (text.ToRuneList (), width, tabWidth, textDirection); + return GetLengthThatFits (text?.ToRuneList () ?? [], width, tabWidth, textDirection); } /// Gets the number of the Runes in a list of Runes that will fit in . diff --git a/Terminal.Gui/Views/CheckBox.cs b/Terminal.Gui/Views/CheckBox.cs index 8d1b6a57b..c43000953 100644 --- a/Terminal.Gui/Views/CheckBox.cs +++ b/Terminal.Gui/Views/CheckBox.cs @@ -1,27 +1,6 @@ #nullable enable namespace Terminal.Gui; -/// -/// Represents the state of a . -/// -public enum CheckState -{ - /// - /// Neither checked nor unchecked. - /// - None, - - /// - /// Checked. - /// - Checked, - - /// - /// Not checked. - /// - UnChecked -} - /// Shows a check box that can be toggled. public class CheckBox : View {