mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Fixed Time/DateField crash
This commit is contained in:
@@ -162,12 +162,12 @@ public class DateField : TextField
|
||||
newPoint = 1;
|
||||
}
|
||||
|
||||
if (newPoint != point)
|
||||
//if (newPoint != point)
|
||||
{
|
||||
CursorPosition = newPoint;
|
||||
}
|
||||
|
||||
while (Text [CursorPosition].ToString () == _separator)
|
||||
while (CursorPosition < Text.GetColumns () - 1 && Text [CursorPosition].ToString () == _separator)
|
||||
{
|
||||
if (increment)
|
||||
{
|
||||
|
||||
@@ -220,12 +220,12 @@ public class TimeField : TextField
|
||||
newPoint = 1;
|
||||
}
|
||||
|
||||
if (newPoint != point)
|
||||
//if (newPoint != point)
|
||||
{
|
||||
CursorPosition = newPoint;
|
||||
}
|
||||
|
||||
while (Text [CursorPosition] == _sepChar [0])
|
||||
while (CursorPosition < Text.GetColumns() -1 && Text [CursorPosition] == _sepChar [0])
|
||||
{
|
||||
if (increment)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user