Skip to content

system.io.exception occurred when typing on Windows with PowerShell 7  #1005

@adityapatwardhan

Description

@adityapatwardhan

Environment data

Environment

PSReadLine: 2.0.0-beta4
PowerShell: 7.0.0-preview.3
OS: Microsoft Windows 10.0.18959
Last 200 Keys

 Backspace i t Spacebar s t a t u s Enter
 g i t Spacebar d o Backspace i f f Enter
 g i t Spacebar a d d Spacebar - a Backspace u Enter
 g i t Spacebar c o m m i t Spacebar - m Spacebar " F i x Spacebar t p Backspace y p i o Spacebar Backspace Backspace p Backspace Backspace o Spacebar i n Spacebar c h e c k s u m " Enter
 g t Spacebar Backspace Backspace Backspace g i t Spacebar p u s h Spacebar o r i g i n Enter
 Ctrl+r s s h Enter
 Ctrl+r s s h Ctrl+r Enter
 Enter
 Enter
 Enter
 c l s Enter
 g i t Spacebar Backspace Backspace Backspace Backspace Backspace c d Spacebar . . Enter
 c d Spacebar p o w r Tab Backspace w e Tab Backspace Backspace w e Backspace Backspace r Backspace e r Tab Enter
 c Backspace Backspace g i t Spacebar s t a t u s Enter
 g i t Spacebar l o g Spacebar = Backspace Backspace Spacebar - - o n e l i n e Spacebar 2 Enter
 PageDown

Exception

System.IO.IOException: The parameter is incorrect.
   at System.ConsolePal.SetWindowPosition(Int32 left, Int32 top)
   at System.Console.SetWindowPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.Internal.VirtualTerminal.SetWindowPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ScrollDisplayDown(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)

Steps to reproduce or exception report

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions