diff --git a/Terminal.Gui/Core/View.cs b/Terminal.Gui/Core/View.cs index 170289c7f8..e59ae60a67 100644 --- a/Terminal.Gui/Core/View.cs +++ b/Terminal.Gui/Core/View.cs @@ -1820,7 +1820,7 @@ public void ClearKeybinding (Key key) /// 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); } }