Allows ListView trigger the Enter and Leave events. (#1508)

* Allows ListView trigger the Enter and Leave events.

* Added unit test for Enter and Leave events to all views.
This commit is contained in:
BDisp
2021-11-13 15:46:49 +00:00
committed by GitHub
parent ce99df4629
commit d84ab39ec3
6 changed files with 120 additions and 50 deletions

View File

@@ -256,7 +256,7 @@ namespace Terminal.Gui {
///<inheritdoc/>
public override void PositionCursor ()
{
if (HotKey == Key.Unknown) {
if (HotKey == Key.Unknown && text != "") {
for (int i = 0; i < base.Text.RuneCount; i++) {
if (base.Text [i] == text [0]) {
Move (i, 0);