Skip to content

Exception on non-Windows w/ command line w/ more lines than visible console buffer #663

Closed
@bgshacklett

Description

@bgshacklett

Environment data

PS version: 6.0.2
PSReadline version: 2.0.0-beta1
os: Darwin BrianShlettsMBP.attlocal.net 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
PS file version:

Steps to reproduce or exception report

This occurred while attempting to paste in the Get-IniContent function at https://gallery.technet.microsoft.com/scriptcenter/ea40c1ef-c856-434b-b8fb-ebd7a76e8d91

Last 200 Keys:
 Space Space } Enter
 Space Space Space Space W r i t e - V e r b o s e Space " $ ( $ M y I n v o c a t i o n . M y C o m m a n d . N a m e ) : : Space F i n i s h e d Space P r o c e s s i n g Space f i l e : Space $ F i l e P a t h " Enter
 Space Space Space Space R e t u r n Space $ i n i Enter
 Space Space } Enter
 Enter
 Space Space E n d Enter
 Space Space { Enter
 Space Space Space Space W r i t e - V e r b o s e Space " $ ( $ M y I n v o c a t i o n . M y C o m m a n d . N a m e ) : : Space F u n c t i o n Space e n d e d " Enter
 Space Space } Enter
 } Enter


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 name: top
Actual value was -69.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   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.SelfInsert(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

Metadata

Metadata

Assignees

Labels

OutOfRangeIssues relating to System.ArgumentOutOfRangeException

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions