Unknown error was reported
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start at Microsoft.PowerShell.PSConsoleReadLine.ConvertOffsetToPoint and follow the callers shown in the exception, especially ReallyRender, ReplaceSelection, and UpdateListSelection. Reproduce by typing a git command and navigating the suggestions list; done means navigation completes without the IndexOutOfRangeException.
Written by the indexing model from the issue text.
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
Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.yaml
Thank you!
### Environment
PSReadLine: 2.4.5
PowerShell: 5.1.26100.8115
OS: Microsoft Windows 10.0.26100
BufferWidth: 263
BufferHeight: 7
Last 200 Keys:
Spacebar c o m m DownArrow DownArrow Enter g i t Spacebar p u s h Enter g i t Spacebar c h e c k o u t Spacebar m a s t e r Enter g i t Spacebar p u l l Enter c d Spacebar . . Enter g i t Spacebar a d d DownArrow DownArrow Enter g i t Spacebar c o m DownArrow DownArrow Enter g i t Spacebar p u s h Enter p o e t r y Spacebar u p d a t e Enter p o e t r y Spacebar a d d Spacebar n u m p y = = 2 . 2 Enter c d Spacebar f a s t Backspace Backspace Backspace Backspace f a s t _ m 3 d s \ Enter t y Backspace Backspace Backspace Backspace g i t Spacebar s t a s h Enter g i t Spacebar c h e c k o u t DownArrow DownArrow Enter g i t Spacebar s t a s h DownArrow Enter g i t Spacebar a d d DownArrow DownArrow Enter g i t Spacebar c o m m DownArrow
### Exception
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Text.StringBuilder.get_Chars(Int32 index)
at Microsoft.PowerShell.PSConsoleReadLine.ConvertOffsetToPoint(Int32 offset, StringBuilder buffer)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.ReplaceSelection(String selectedItemText)
at Microsoft.PowerShell.PSConsoleReadLine.UpdateListSelection(Int32 numericArg)
at Microsoft.PowerShell.PSConsoleReadLine.NextHistory(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
PSReadLine: 2.4.5
PowerShell: 5.1.26100.8115
OS: Microsoft Windows 10.0.26100
BufferWidth: 263
BufferHeight: 7
Steps to reproduce
As far as I could remember, I was typing a git command and then navigating through the list of the suggestions.
Expected behavior
Easy navigation through the list of of suggestions.
Actual behavior
The above error was displayed.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 341
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PowerShell/PSReadLine
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Difficulty 1/5 Under an hour Newbie friendliness 68/100
PowerShell/PSReadLine#3470 · 3 reactions ·
All issues in PowerShell/PSReadLine
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
azurenoops/spin_agent#975 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·