Skip to content

InsertText method inserts lone carriage return characters as new lines. #437

Open
@SeeminglyScience

Description

@SeeminglyScience

Steps to reproduce

  1. Open a existing script file with CRLF end of line sequence.

  2. Move cursor to the end of the file.

  3. In the integrated console run

$chars = $psEditor.GetEditorContext().CurrentFile.GetText().ToCharArray()

$chars.ForEach{
    $psEditor.GetEditorContext().CurrentFile.InsertText($PSItem)
    Start-Sleep -Milliseconds 50
}

The file will be reproduced character by character, but with double lines.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions