You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug Report: bug/exception happening in VSCode Terminal upon alt-tabbing back in and selecting terminal #5131
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.yamlThank you!### EnvironmentPSReadLine: 2.4.5PowerShell: 7.6.1OS: Microsoft Windows 10.0.22631BufferWidth: 113BufferHeight: 14Last 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### ExceptionSystem.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:
changed the title [-]Bug Report happening in VSCode Terminal[/-][+]Bug Report happening in VSCode Terminal upon alt-tabbing back in and selecting terminal[/+]on Apr 23, 2026
changed the title [-]Bug Report happening in VSCode Terminal upon alt-tabbing back in and selecting terminal[/-][+]Bug Report: bug/exception happening in VSCode Terminal upon alt-tabbing back in and selecting terminal[/+]on Apr 23, 2026
Activity
[-]Bug Report happening in VSCode Terminal[/-][+]Bug Report happening in VSCode Terminal upon alt-tabbing back in and selecting terminal[/+][-]Bug Report happening in VSCode Terminal upon alt-tabbing back in and selecting terminal[/-][+]Bug Report: bug/exception happening in VSCode Terminal upon alt-tabbing back in and selecting terminal[/+]