Skip to content

System.InvalidOperationException Cannot locate the offset in the rendered text that was pointed by the original cursor. Initial Coord: (51, 47) Buffer: (87, 51) Cursor: (78, 50) #5239

Open

Description

@jamespack

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

Im only reporting this because it asked me to. I have no idea how to repro it. Soryy :|

`
Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.yaml
Thank you!

### Environment
PSReadLine: 2.4.5
PowerShell: 7.6.5
OS: Microsoft Windows 10.0.26200
BufferWidth: 102
BufferHeight: 51

Last 200 Keys:

 e r N a m e Spacebar - - c e r t i f i c a t e Spacebar c : \ d e p l o y \ d e p l o y m e n t - r e s o u r c e s \ p r e p r o d 2 . p e m Spacebar - - t e n a n t Spacebar $ p r o p s . T e n a n t I d Spacebar - - a l l o w - n o - s u b s c r i p t i o n s Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+RightArrow Ctrl+RightArrow LeftArrow Ctrl+LeftArrow Ctrl+LeftArrow Ctrl+RightArrow LeftArrow RightArrow RightArrow Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Delete Delete Delete Delete i n v o k e - c o m m a n d - Backspace Spacebar - s c r i p t b l o c k DownArrow DownArrow DownArrow DownArrow Ctrl+c

### Exception

System.InvalidOperationException: Cannot locate the offset in the rendered text that was pointed by the original cursor. Initial Coord: (51, 47) Buffer: (87, 51) Cursor: (78, 50)
   at Microsoft.PowerShell.PSConsoleReadLine.RecomputeInitialCoords(Boolean isTextBufferUnchanged)
   at Microsoft.PowerShell.PSConsoleReadLine.RenderForScreenReader()
   at Microsoft.PowerShell.PSConsoleReadLine.Render(Boolean force)
   at Microsoft.PowerShell.PSConsoleReadLine.CancelLine(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.CopyOrCancelLine(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)`

Screenshot

image

Environment data

PS Version: 7.6.5
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.4.5
PSReadLine EditMode: Windows
OS: 10.0.26100.1 (WinBuild.160101.0800)
BufferWidth: 209

Steps to reproduce

I really have no idea.. i stepped away and came back and it was there

Expected behavior

No exception

Actual behavior

Exception

Activity

  1. added
    Needs-Triage 🔍
    on Nov 17, 2026
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 🔍

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions