Skip to content

Lines that wrap on space characters at the bottom of the buffer (“new bottom line”) receive an extra line break #5386

@DHowett-MSFT

Description

@DHowett-MSFT

With 0.11.xxx selfhost builds, The following steps reliably result in visual corruption (and also drove me a little crazy!)

  1. Terminal width = 120
  2. Go to the terminal source tree
  3. git blame 862793299a src/types/UiaTextRangeBase.cpp
  4. Search for GetTextRects using /:
    • /GetTextRects<CR>
  5. Go to the next match, using n.
  6. Notice that GetTextRects, which should be on the top line, is gone.
  7. Move right, left (arrow keys), and notice that it reappears.

bad

image

good

image

If you look at the bad image, I highlighted two things that caught my eye. Those are lines that have spaces in column 121, before less hard wraps them (!) I don't have 121 columns ...

Confirmed this in a text editor with the debug tap. I highlighted in blue the same regions that caused a break here.

The vertical strip under the cursor (look for the blue boxes) indicates column 121. Most of the escape sequences for cursor movement start here, but in the boxed areas they're not escapes.

image

Is this the exact wrap issue? Except with conpty sending spaces instead?

Metadata

Metadata

Assignees

Labels

Area-OutputRelated to output processing (inserting text into buffer, retrieving buffer text, etc.)Issue-BugIt either shouldn't be doing this or needs an investigation.Priority-1A description (P1)Product-ConptyFor console issues specifically related to conptyResolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions