Pressing a Key in Windows Terminal Causes Exception using Powershell 7
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 57/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
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: 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.
- Langage dominant
- C#
- Étoiles
- 4.4k
- Forks
- 346
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PowerShell/PSReadLine
-
Get-PSReadLineOption emits the ListView window-size warning, so prompt modules trigger it on every shell startPeut-être pris @thc1006 l’a pris il y a 77 jours. OuverteNeeds-Triage :mag:
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Difficulté 1/5 Moins d'une heure Accessibilité débutants 68/100
PowerShell/PSReadLine#3470 · 3 réactions ·
Toutes les issues de PowerShell/PSReadLine
Issues similaires
-
area-templates triage:bot-seen triage:needs-human
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
microsoft/aspire#22356 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Needs-Triage
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
PowerShell/PowerShell#28432 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
microsoft/aspire.dev#2184 ·
Les mainteneurs répondent en général sous 2 jours
-
area-controls-refreshview platform/ios s/triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
dotnet/maui#40314 · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
Needs: Triage (Functions) v5 v5-preview5
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Azure/azure-functions-core-tools#5918 ·
Les mainteneurs répondent en général sous 1 jour