From a5f9c070223815ac2aac0aa1d60a37bb5d61ff8b Mon Sep 17 00:00:00 2001 From: tznind Date: Thu, 6 Apr 2023 04:49:15 +0100 Subject: [PATCH] Fix MoveEnd name conflicting with base class --- Terminal.Gui/Views/DateField.cs | 7 +------ Terminal.Gui/Views/TimeField.cs | 8 +------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/Terminal.Gui/Views/DateField.cs b/Terminal.Gui/Views/DateField.cs index 8f0c1f5f2..18f1752ad 100644 --- a/Terminal.Gui/Views/DateField.cs +++ b/Terminal.Gui/Views/DateField.cs @@ -83,7 +83,7 @@ namespace Terminal.Gui { AddCommand (Command.DeleteCharLeft, () => { DeleteCharLeft (); return true; }); AddCommand (Command.LeftHome, () => MoveHome ()); AddCommand (Command.Left, () => MoveLeft ()); - AddCommand (Command.RightEnd, () => MoveEnd ()); + AddCommand (Command.RightEnd, () => { MoveEnd (); return true; }); AddCommand (Command.Right, () => MoveRight ()); // Default keybindings for this view @@ -354,11 +354,6 @@ namespace Terminal.Gui { return true; } - bool MoveEnd () - { - CursorPosition = fieldLen; - return true; - } bool MoveLeft () { diff --git a/Terminal.Gui/Views/TimeField.cs b/Terminal.Gui/Views/TimeField.cs index b2f9ba018..442f70f5c 100644 --- a/Terminal.Gui/Views/TimeField.cs +++ b/Terminal.Gui/Views/TimeField.cs @@ -83,7 +83,7 @@ namespace Terminal.Gui { AddCommand (Command.DeleteCharLeft, () => { DeleteCharLeft (); return true; }); AddCommand (Command.LeftHome, () => MoveHome ()); AddCommand (Command.Left, () => MoveLeft ()); - AddCommand (Command.RightEnd, () => MoveEnd ()); + AddCommand (Command.RightEnd, () => { MoveEnd (); return true; }); AddCommand (Command.Right, () => MoveRight ()); // Default keybindings for this view @@ -272,12 +272,6 @@ namespace Terminal.Gui { return true; } - bool MoveEnd () - { - CursorPosition = fieldLen; - return true; - } - bool MoveLeft () { DecCursorPosition ();