mirror of
https://github.com/PowerShell/PSReadLine
synced 2026-06-08 12:12:13 +00:00
User should not be able to set MaxHistoryCount to unsupported value
Validate that MaxHistoryCount lies within the range of 1-int.maxValue.
This commit is contained in:
@@ -461,6 +461,7 @@ namespace Microsoft.PowerShell
|
||||
internal SwitchParameter? _historySearchCursorMovesToEnd;
|
||||
|
||||
[Parameter(ParameterSetName = "OptionsSet")]
|
||||
[ValidateRange(1, int.MaxValue)]
|
||||
public int MaximumHistoryCount
|
||||
{
|
||||
get { return _maximumHistoryCount.GetValueOrDefault(); }
|
||||
|
||||
Reference in New Issue
Block a user