Bug Report: bug/exception happening in VSCode Terminal upon alt-tabbing back in and selecting terminal
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 48/100
Rechercherichtung
Start by reproducing the intermittent failure in a VSCode terminal using the listed alt-tab and terminal-selection steps. Trace the stack from CalculateWhereAndWhat through ReallyRender and ForceRender, focusing on the cursor top value versus the console buffer size. Done means the repro no longer raises the ArgumentOutOfRangeException.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.1
OS: Microsoft Windows 10.0.22631
BufferWidth: 113
BufferHeight: 14
Last 107 Keys:
Ctrl+z Ctrl+v Spacebar e s l i n t - p l u g i n - t y p e f e s t Spacebar - - f o r c e Enter n p m Spacebar i n s t a l l DownArrow Enter UpArrow Spacebar e s l Backspace Backspace Backspace @ t y p e s c r i p t - e s l i n t / p a r s e r Enter n p m Spacebar r u n Spacebar u p DownArrow Enter n p m Spacebar r u n Spacebar l i n t Enter n
### Exception
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. (Parameter 'top')
Actual value was 14.
at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.CalculateWhereAndWhatToRender(Boolean cursorMovedToInitialPos, RenderData renderData, LineInfoForRendering& lineInfoForRendering)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
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
I've seen this happening in vscode as of the last couple weeks, and it only seems to happen after alt-tabing back in and selecting the terminal again, not after the previous command:
Environment data
PS Version: 7.6.1
PS HostName: ConsoleHost
PSReadLine Version: 2.4.5
PSReadLine EditMode: Windows
OS: 10.0.22621.1 (WinBuild.160101.0800)
BufferWidth: 113
BufferHeight: 41
Steps to reproduce
- Use vscode terminal with PSReadline
- Alt tab out
- Alt tab back in
- click/select terminal again
Does not happen consistently.
Expected behavior
Throws error, but it doesn't seem to actually cause any issues, but I thought to report it since I keep seeing it tell me to lol
Actual behavior
Error occurs in terminal
- Vorherrschende Sprache
- C#
- Sterne
- 4.4k
- Forks
- 341
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PowerShell/PSReadLine
-
Needs-Triage :mag:
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
PowerShell/PSReadLine#3470 · 3 Reaktionen ·
Alle Issues in PowerShell/PSReadLine
Ähnliche Issues
-
bug documentation frontend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
azurenoops/spin_agent#975 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
SubtitleEdit/subtitleedit#15108 · 1 Kommentar ·
-
area/docs-content Bug pulumi/docs
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 94/100