-
Notifications
You must be signed in to change notification settings - Fork 317
Closed
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues, especially the pinned issues.
Exception report
PS D:\PROGRAMER>
pyt
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 61 Keys:
p y t h o n Space - u Space " d : \ P R O G R A M E R \ P Y T H O N \ R U P P \ l e a r n Space P y t h
o n \ a p p l s i t . p y " 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: left
Actual value was -2.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
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)Screenshot
Environment data
PS D:\PROGRAMER> $hostName = $Host.Name
nue)) {
>> $id = $PID; $inWindowsTerminal = $false
>> while ($true) {
>> $p = Get-CimInstance -ClassName Win32_Process -Filter "ProcessId Like $id"
>> if (!$p -or !$p.Name) { break }
>> if ($p.Name -eq "WindowsTerminal.exe") { $inWindowsTerminal = $true; break }
>> $id = $p.ParentProcessId
>> }
>> if ($inWindowsTerminal) { $hostName += " (Windows Terminal)" }
>> }
PS D:\PROGRAMER>
PS D:\PROGRAMER> $m = Get-Module PSReadline
PS D:\PROGRAMER> $v = $m.Version; $pre = $m.PrivateData.PSData.Prerelease
PS D:\PROGRAMER> if ($pre) { $v = "$v-$pre" }
PS D:\PROGRAMER> $os = if ($IsLinux -or $IsMacOS) { uname -a } else { (dir $env:SystemRoot\System32\cmd.exe).VersionInfo.FileVersion }
PS D:\PROGRAMER>
PS D:\PROGRAMER> Write-Host ''
PS D:\PROGRAMER> Write-Host "PS Version: $($PSVersionTable.PSVersion)"
PS Version: 5.1.19041.4648
PS D:\PROGRAMER> Write-Host "PS HostName: $hostName"
PS HostName: ConsoleHost
PS D:\PROGRAMER> Write-Host "PSReadLine Version: $v"
PSReadLine Version: 2.0.0-beta2
PS D:\PROGRAMER> Write-Host "PSReadLine EditMode: $((Get-PSReadLineOption).EditMode)"
PSReadLine EditMode: Windows
PS D:\PROGRAMER> Write-Host "OS: $os"
OS: 10.0.19041.1 (WinBuild.160101.0800)
PS D:\PROGRAMER> Write-Host "BufferWidth: $([console]::BufferWidth)"
BufferWidth: 113
PS D:\PROGRAMER> Write-Host "BufferHeight: $([console]::BufferHeight)"
BufferHeight: 35
PS D:\PROGRAMER> Write-Host ''
PS D:\PROGRAMER>Steps to reproduce
Expected behavior
start=int(input("Enter start: "))
stop=int(input("Enter stop: "))
list_year=[]
for i in range(start,stop):
if (i%400==0) or (i%4==0 and i%100!=0):
list_year.append(i)
print(list_year)
Actual behavior
Metadata
Metadata
Assignees
Labels
No labels


