diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/RecentCommandsManager.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/RecentCommandsManager.cs index 9d2e0d92c1..9e971ae510 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/RecentCommandsManager.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/RecentCommandsManager.cs @@ -68,7 +68,7 @@ public partial class RecentCommandsManager : ObservableObject if (History.Count > 50) { - History.RemoveRange(50, History.Count); + History.RemoveRange(50, History.Count - 50); } } }