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

Open
opened 2026-01-31 05:41:32 +00:00 by claunia · 0 comments
Owner

Originally created by @DHowett on GitHub (May 4, 2022).

  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:

9edf55de75/src/cascadia/TerminalCore/Terminal.cpp (L252-L256)

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:

9edf55de75/src/cascadia/TerminalCore/TerminalApi.cpp (L42-L47)

Potentially regressed in #13024 (/cc @j4james)

Originally created by @DHowett on GitHub (May 4, 2022). 1. WSL, in a small window 2. `vim -u NONE` 3. Maximize the window 4. <kbd>Esc</kbd> `:q` <kbd>Enter</kbd> 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: https://github.com/microsoft/terminal/blob/9edf55de7564912cb8e19ef3a3f88b689be08af7/src/cascadia/TerminalCore/Terminal.cpp#L252-L256 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`: https://github.com/microsoft/terminal/blob/9edf55de7564912cb8e19ef3a3f88b689be08af7/src/cascadia/TerminalCore/TerminalApi.cpp#L42-L47 Potentially regressed in #13024 (/cc @j4james)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17405