mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fixes ComboBox text and list if the height is equal to one. (#1606)
* Fixes ComboBox text and list if the height is equal to one. End and Home navigate on text.
* Trying fix the all scenarios unit test.
* Removing unnecessary code.
* Avoiding the Collection was modified after the enumerator was instantiated exception.
* Also cover the IndexOfValue inside the lock.
* Disposing the DrawContent event.
* Increasing the time to test.
* Revert "Increasing the time to test."
This reverts commit b3c2ac871c.
* CharacterMap take more time to load.
This commit is contained in:
@@ -159,10 +159,12 @@ namespace Terminal.Gui {
|
||||
/// This method also returns <c>false</c> if the timeout is not found.
|
||||
public bool RemoveTimeout (object token)
|
||||
{
|
||||
var idx = timeouts.IndexOfValue (token as Timeout);
|
||||
if (idx == -1)
|
||||
return false;
|
||||
timeouts.RemoveAt (idx);
|
||||
lock (timeouts) {
|
||||
var idx = timeouts.IndexOfValue (token as Timeout);
|
||||
if (idx == -1)
|
||||
return false;
|
||||
timeouts.RemoveAt (idx);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -177,8 +179,11 @@ namespace Terminal.Gui {
|
||||
if (k < now) {
|
||||
if (timeout.Callback (this))
|
||||
AddTimeout (timeout.Span, timeout);
|
||||
} else
|
||||
timeouts.Add (k, timeout);
|
||||
} else {
|
||||
lock (timeouts) {
|
||||
timeouts.Add (k, timeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user