Fixes #822. Moves the cursor position to the first rune if no hotkey is specified.

This commit is contained in:
BDisp
2020-07-24 13:44:20 +01:00
parent c1d49a8b0f
commit d17e3d5ef7

View File

@@ -220,5 +220,19 @@ namespace Terminal.Gui {
}
return false;
}
///<inheritdoc/>
public override void PositionCursor ()
{
if (HotKey == Key.Unknown) {
for (int i = 0; i < base.Text.RuneCount; i++) {
if (base.Text [i] == text [0]) {
Move (i, 0);
return;
}
}
}
base.PositionCursor ();
}
}
}