mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Add ToArray to prevent 'Collection has been modified' Exception in older runtimes (#1976)
This commit is contained in:
@@ -1820,7 +1820,7 @@ namespace Terminal.Gui {
|
||||
/// <param name="command"></param>
|
||||
public void ClearKeybinding (params Command [] command)
|
||||
{
|
||||
foreach (var kvp in KeyBindings.Where (kvp => kvp.Value.SequenceEqual (command))) {
|
||||
foreach (var kvp in KeyBindings.Where (kvp => kvp.Value.SequenceEqual (command)).ToArray()) {
|
||||
KeyBindings.Remove (kvp.Key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user