Skip to content

Resizing while alt buffer is active, then disabling it, blows away renderer #13038

@DHowett

Description

@DHowett
  1. WSL, in a small window
  2. vim -u NONE
  3. Maximize the window
  4. Esc :q Enter
  5. Observe the window get "stuck" on vim

It looks like we're failing to render a dirty region that is outside of the new, smaller main buffer.

It appears as though Terminal is not resizing the main buffer, as it believes it is already the correct size.

That check is happening here:

const auto oldDimensions = _GetMutableViewport().Dimensions();
if (viewportSize == oldDimensions)
{
return S_FALSE;
}

At the time of failure, _GetMutableViewport returns _mutableViewport, since we are no longer in the alt buffer.

Setting a write breakpoint on _mutableViewport to determine who is setting it, it's coming from EraseAll -> SetViewportPosition:

void Terminal::SetViewportPosition(const til::point position)
{
const auto dimensions = _GetMutableViewport().Dimensions();
_mutableViewport = Viewport::FromDimensions(position.to_win32_coord(), dimensions);
Terminal::_NotifyScrollEvent();
}

Potentially regressed in #13024 (/cc @j4james)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingPriority-1A description (P1)Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.Severity-CrashCrashes are real bad news.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions