-
Notifications
You must be signed in to change notification settings - Fork 320
Closed
Labels
Area-StabilityLabel for tracking stability IssuesLabel for tracking stability IssuesIssue-BugIt either shouldn't be doing this or needs an investigation.It either shouldn't be doing this or needs an investigation.Resolution-Fixed
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues, especially the pinned issues.
Exception report
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string. (Parameter 'length')
at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length)
at System.String.Substring(Int32 startIndex, Int32 length)
at Microsoft.PowerShell.PSConsoleReadLine.MenuCompleteImpl(Menu menu, CommandCompletion completions)
at Microsoft.PowerShell.PSConsoleReadLine.PossibleCompletionsImpl(CommandCompletion completions, Boolean menuSelect)
at Microsoft.PowerShell.PSConsoleReadLine.CompleteImpl(Boolean menuSelect)
at Microsoft.PowerShell.PSConsoleReadLine.MenuComplete(Nullable`1 key, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(PSKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)Screenshot
Environment data
PS Version: 7.3.2
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.2.6
PSReadLine EditMode: Windows
OS: 10.0.19041.320 (WinBuild.160101.0800)
BufferWidth: 202
BufferHeight: 60Steps to reproduce
- run
Set-PSReadlineKeyHandler -Chord Tab -Function MenuCompleteto enable menu completion with tab key - run
Set-PSReadLineOption -HistorySearchCursorMovesToEndto move cursor to the end after history search - have folders
strongandstrongholdin current empty folder - type following keys:
c d Spacebar s Tab h Tab Backspace h
Expected behavior
No exception.
Actual behavior
The above exception happens.
Metadata
Metadata
Assignees
Labels
Area-StabilityLabel for tracking stability IssuesLabel for tracking stability IssuesIssue-BugIt either shouldn't be doing this or needs an investigation.It either shouldn't be doing this or needs an investigation.Resolution-Fixed
