Skip to content

bug report #5094

Open
Open

Description

@mozirrar-arch

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

Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/ne

Screenshot

i want to report the bug

Environment data

Last 6 Keys:
 & Space C : / U

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
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
   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)

Steps to reproduce

i want to report the bug

Expected behavior

i want to report the bug

Actual behavior

i want to report the bug

Activity

  1. xiaoyiming123 commented on May 11, 2026

    @xiaoyiming123

    When I use uparrow to

    异常:
    System.ArgumentOutOfRangeException: 该值必须大于或等于零,且必须小于控制台缓冲区在该维度的大小。
    参数名: top
    实际值是 -2。
       在 System.Console.SetCursorPosition(Int32 left, Int32 top)
       在 Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
       在 Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
       在 Microsoft.PowerShell.PSConsoleReadLine.HistoryRecall(Int32 direction)
       在 Microsoft.PowerShell.PSConsoleReadLine.PreviousHistory(Nullable`1 key, Object arg)
       在 Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
       在 Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
       在 Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
    -----------------------------------------------------------------------
    PS C:\Users\admin> void dfs(int u) {                                                                                                                                                             
    >>     sz[u] = 1;
    >>     for (int v : t[u]) {
    >>         dfs(v);
    >>         sz[u] += sz[v];
    >>         if (!son[u] || sz[son[u]] < sz[v]) son[u] = v;
    >>     }
    >> }
    

    Which cause a error

  2. xiaoyiming123 commented on May 11, 2026

    @xiaoyiming123

    Every time I press the arrow and this appears, it triggers an error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-Triage 🔍It's a new issue that core contributor team needs to triage.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions