question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lzybkrcommented, Apr 7, 2018

Thanks for narrowing down the problem - I can reproduce on Linux as well, I’ve updated the title accordingly.

0reactions
daxian-dbwcommented, Sep 12, 2019

Fixed by #979

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change Screen buffer size in Windows Command ...
Easily proven by running the command with a setting for 'lines=2500' (or whatever buffer you want) and then check the 'Properties' of the...
Read more >
Exception when running dotnet-counters monitor under ...
Exception when running dotnet-counters monitor under Windows Terminal (and with reduced console buffer sizes) #1716.
Read more >
Windows Command Prompt: How do I increase my buffer?
Right-click on the CMD prompt's Title bar > Properties > Layout > Screen buffer size will let you increase the screen buffer size....
Read more >
How to increase output buffer size in Windows command ...
Properties -> Options -> Command History -> Buffer Size is the number of previous commandlines that Windows Console will remember.
Read more >
Window and Screen Buffer Size - Windows Console
In the virtual terminal sequences world, the size of the window and the size of the screen buffer are fixed to the same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found