Pressing a Key in Windows Terminal Causes Exception using Powershell 7
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 57/100
Direção de pesquisa
Start by tracing the reported call path from Insert through Render to RecomputeInitialCoords in PSReadLine. Reproduce in PowerShell 7.6.2 on Windows Terminal by splitting a pane and pressing Space; investigate the cursor and buffer coordinates in the exception. Done means the input no longer throws and the behavior is covered by a regression test.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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: 7.6.2
OS: Microsoft Windows 10.0.26200
BufferWidth: 75
BufferHeight: 43
Last 1 Keys:
s
### Exception
System.InvalidOperationException: Cannot locate the offset in the rendered text that was pointed by the original cursor. Initial Coord: (4, 16) Buffer: (75, 62) Cursor: (4, 17)
at Microsoft.PowerShell.PSConsoleReadLine.RecomputeInitialCoords(Boolean isTextBufferUnchanged)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Render(Boolean force)
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(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
N/A. I just opened Windows Terminal.
Environment data
PS Version: 7.6.2
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.4.5
PSReadLine EditMode: Windows
OS: 10.0.26100.1 (WinBuild.160101.0800)
BufferWidth: 75
BufferHeight: 43
Steps to reproduce
Open Windows Terminal. Split pane. Press spacebar.
I just started typing.
Expected behavior
No exception.
Actual behavior
Seems normal after the exception.
- Linguagem predominante
- C#
- Estrelas
- 4.4k
- Forks
- 346
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de PowerShell/PSReadLine
-
Get-PSReadLineOption emits the ListView window-size warning, so prompt modules trigger it on every shell startTalvez já em andamento @thc1006 assumiu há 77 dias. AbertaNeeds-Triage :mag:
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 68/100
PowerShell/PSReadLine#3470 · 3 reações ·
Todas as issues de PowerShell/PSReadLine
Issues semelhantes
-
area-templates triage:bot-seen triage:needs-human
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
microsoft/aspire#22356 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Needs-Triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
PowerShell/PowerShell#28432 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
documentation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
microsoft/aspire.dev#2184 ·
Mantenedores costumam responder em até 2 dias
-
area-controls-refreshview platform/ios s/triaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
dotnet/maui#40314 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Needs: Triage (Functions) v5 v5-preview5
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Azure/azure-functions-core-tools#5918 ·
Mantenedores costumam responder em até 1 dia