Skip to content

VtEngine: Console-style (undelayed) line wraps results in \r\n #16461

@lhecker

Description

@lhecker

Windows Terminal version

1.16.230126001

Windows build number

No response

Other Software

No response

Steps to reproduce

  • Use cmd.exe
  • Scroll at least 1 viewport down (hold Enter or Ctrl+C, etc.)
  • Type text until it line wraps
  • Copy the prompt to your clipboard

Expected Behavior

Clipboard contains 1 line of text without line wraps.

Actual Behavior

The clipboard is line wrapped at the right margin.

XtermEngine::_MoveCursor is called 3 times during the forced line wrap. When I type a single "a" at the end of the prompt, this results in 3 cursor movement sequences in total and the character being printed twice:

a\r\n\x1b[23;80Ha\r\n

I'm setting this to P2 because this bug has probably existed since the beginning. There might be a duplicate already.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-RenderingText rendering, emoji, complex glyph & font-fallback issuesIn-PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-2A description (P2)Product-ConptyFor console issues specifically related to conpty

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions