Pressing a Key in Windows Terminal Causes Exception using Powershell 7
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 57/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C#
- Star
- 4.4k
- Fork
- 346
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PowerShell/PSReadLine
-
Get-PSReadLineOption emits the ListView window-size warning, so prompt modules trigger it on every shell startCó thể đã có người làm @thc1006 đã nhận 77 ngày trước. Đang mởNeeds-Triage :mag:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
PowerShell/PSReadLine#3470 · 3 reaction ·
Tất cả issue của PowerShell/PSReadLine
Issue tương tự
-
area-templates triage:bot-seen triage:needs-human
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoft/aspire#22356 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Needs-Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
PowerShell/PowerShell#28432 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/aspire.dev#2184 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area-controls-refreshview platform/ios s/triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
dotnet/maui#40314 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Needs: Triage (Functions) v5 v5-preview5
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Azure/azure-functions-core-tools#5918 ·
Maintainer thường phản hồi trong vòng 1 ngày