diff --git a/Terminal.Gui/Views/TextInput/TextView/TextView.cs b/Terminal.Gui/Views/TextInput/TextView/TextView.cs index 4e70f2e46..0864a6672 100644 --- a/Terminal.Gui/Views/TextInput/TextView/TextView.cs +++ b/Terminal.Gui/Views/TextInput/TextView/TextView.cs @@ -4884,24 +4884,4 @@ public class TextView : View, IDesignable base.Dispose (disposing); } -} - -/// -/// Renders an overlay on another view at a given point that allows selecting from a range of 'autocomplete' -/// options. An implementation on a TextView. -/// -public class TextViewAutocomplete : PopupAutocomplete -{ - /// - protected override void DeleteTextBackwards () { ((TextView)HostControl!).DeleteCharLeft (); } - - /// - protected override void InsertText (string accepted) { ((TextView)HostControl!).InsertText (accepted); } - - /// - protected override void SetCursorPosition (int column) - { - ((TextView)HostControl!).CursorPosition = - new (column, ((TextView)HostControl).CurrentRow); - } -} +} \ No newline at end of file diff --git a/Terminal.Gui/Views/TextInput/TextView/TextViewAutocomplete.cs b/Terminal.Gui/Views/TextInput/TextView/TextViewAutocomplete.cs new file mode 100644 index 000000000..5e5a67244 --- /dev/null +++ b/Terminal.Gui/Views/TextInput/TextView/TextViewAutocomplete.cs @@ -0,0 +1,21 @@ +namespace Terminal.Gui.Views; + +/// +/// Renders an overlay on another view at a given point that allows selecting from a range of 'autocomplete' +/// options. An implementation on a TextView. +/// +public class TextViewAutocomplete : PopupAutocomplete +{ + /// + protected override void DeleteTextBackwards () { ((TextView)HostControl!).DeleteCharLeft (); } + + /// + protected override void InsertText (string accepted) { ((TextView)HostControl!).InsertText (accepted); } + + /// + protected override void SetCursorPosition (int column) + { + ((TextView)HostControl!).CursorPosition = + new (column, ((TextView)HostControl).CurrentRow); + } +}