Skip to content

Strange bug with double quotes #4049

@CharlesRobertoSky

Description

@CharlesRobertoSky

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/new
-----------------------------------------------------------------------   
Last 107 Keys:
 Ctrl+c Ctrl+c c d Space Ctrl+w Backspace Backspace Backspace Backspace Backspace c d Space w e b s i t e Enter
 n p m Space r u n Space b u i l d Enter
 c d Space . . Enter
 g i t Space c o m m i t Space - m Space " Ctrl+c Ctrl+v Ctrl+v UpArrow BaSpace p u s h Space o i Backspace r i g i n Space m a i n Enter
 " Backspace Backspace " Shift+Tab "

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 -1.
   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.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.PSCon

Screenshot

imagem_2024-06-22_235854189

Environment data

Name                           Value
----                           -----
PSVersion                      5.1.19041.4412
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.4412
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.19045.0 Microsoft Windows NT 10.0.19045.0

Steps to reproduce

When I went to make a commit, when I wrote the double quotes this error appeared

Expected behavior

make a commit

Actual behavior

return error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions