Exception when recalling command line with more lines than screen
See original GitHub issuePSReadLine crashes when doing Up arrow looking for commands that has been previously executed.
Environment data
Provide the output of the following:
& {
"PS version: $($PSVersionTable.PSVersion)"
$v = (Get-Module PSReadline).Version
$m = Get-Content "$(Split-Path -Parent (Get-Module PSReadLine).Path)\PSReadLine.psd1" | Select-String "Prerelease = '(.*)'"
if ($m) {
$v = "$v-" + $m.Matches[0].Groups[1].Value
}
"PSReadline version: $v"
if ($IsLinux -or $IsMacOS) {
"os: $(uname -a)"
} else {
"os: $((dir $env:SystemRoot\System32\cmd.exe).VersionInfo.FileVersion)"
}
"PS file version: $((dir $pshome\p*[hl].exe).VersionInfo.FileVersion)"
}
PS version: 6.1.0-preview.1
PSReadline version: 1.2
os: Linux mars 4.13.0-38-generic #43-Ubuntu SMP Wed Mar 14 15:20:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
PS file version:
–>
Steps to reproduce or exception report
Use the keyboard up arrow to scan thru previous entered commands. Exception message:
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 25 Keys:
UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow
UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow UpArrow
UpArrow UpArrow UpArrow UpArrow UpArrow
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 -25.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.Internal.TTYConsole.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.PlaceCursor(Int32 x, Int32& y)
at Microsoft.PowerShell.PSConsoleReadLine.PlaceCursor()
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender()
at Microsoft.PowerShell.PSConsoleReadLine.Render()
at Microsoft.PowerShell.PSConsoleReadLine.UpdateFromHistory(Boolean moveCursor)
at Microsoft.PowerShell.PSConsoleReadLine.HistoryRecall(Int32 direction)
at Microsoft.PowerShell.PSConsoleReadLine.PreviousHistory(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:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
logging - More lines in command window
Go to properties as mentioned by Kristina; Go to the layout tab (that's the third one); Modify the screen buffer size's height -...
Read more >Using the Command-Line Interface [Cisco Catalyst Micro ...
The More prompt is used for any output that has more lines than can be displayed on the terminal screen, including show command...
Read more >Command Line Tips and Tricks - Using IDL - NV5 Geospatial
You can change the number of command lines saved in the recall buffer by setting the IDL_RBUF_SIZE preference equal to a number other...
Read more >Screen User's Manual
1 Overview. Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.
Read more >Set-PSReadLineOption (PSReadLine) - PowerShell
Specifies the number of extra lines. If your prompt spans more than one line, specify a value for this parameter. Use this option...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is this potentially related to #663?
Yep, I recalled the other but didn’t look for it. Thanks @bgshacklett.