Skip to content

Commit

Permalink
Fix MoveEnd name conflicting with base class
Browse files Browse the repository at this point in the history
  • Loading branch information
tznind committed Apr 6, 2023
1 parent 5c799fc commit a5f9c07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
7 changes: 1 addition & 6 deletions Terminal.Gui/Views/DateField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void Initialize (DateTime date, bool isShort = false)
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
Expand Down Expand Up @@ -354,11 +354,6 @@ bool MoveRight ()
return true;
}

bool MoveEnd ()
{
CursorPosition = fieldLen;
return true;
}

bool MoveLeft ()
{
Expand Down
8 changes: 1 addition & 7 deletions Terminal.Gui/Views/TimeField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void Initialize (TimeSpan time, bool isShort = false)
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
Expand Down Expand Up @@ -272,12 +272,6 @@ bool MoveRight ()
return true;
}

bool MoveEnd ()
{
CursorPosition = fieldLen;
return true;
}

bool MoveLeft ()
{
DecCursorPosition ();
Expand Down

0 comments on commit a5f9c07

Please sign in to comment.