-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resizing while alt buffer is active, then disabling it, blows away renderer #13038
Comments
Yeah, it's definitely regressed in #13024. I remember thinking at the time that the assignment to terminal/src/cascadia/TerminalCore/TerminalApi.cpp Lines 301 to 303 in 6b936d9
So I'm not sure why that worked before. There must be something else different between the conhost and terminal architectures. I'll do some digging. |
OK, I see now why it worked before. The terminal "EraseAll" implementation had an early exit check for |
But now that I think about it we can just make the |
That makes sense to me. The viewport in the alt buffer is always the entire buffer, right? |
Yeah, if you look at the terminal/src/cascadia/TerminalCore/Terminal.cpp Lines 970 to 977 in f4e0d9f
|
## Summary of the Pull Request When `TerminalDispatch` was merged with `AdaptDispatch` in PR #13024, that broke the Terminal's `EraseAll` operation in the alt buffer. The problem was that the `EraseAll` implementation makes a call to `SetViewportPosition` which wasn't taking the alt buffer into account, and thus modified the main viewport instead. This PR corrects that mistake. If we're in the alt buffer, the `SetViewportPosition` method now does nothing, since the alt buffer viewport should always be at 0,0. ## References This was a regression introduced in PR #13024. ## PR Checklist * [x] Closes #13038 * [x] CLA signed. * [ ] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [x] I've discussed this with core contributors already. Issue number where discussion took place: #13038 ## Validation Steps Performed I've confirmed that the test case reported in issue #13038 is no longer failing. I've also made sure the `ED 2` and `ED 3` sequences are still working correctly in the main buffer.
🎉This issue was addressed in #13039, which has now been successfully released as Handy links: |
vim -u NONE
:q
EnterIt 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:
terminal/src/cascadia/TerminalCore/Terminal.cpp
Lines 252 to 256 in 9edf55d
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 fromEraseAll
->SetViewportPosition
:terminal/src/cascadia/TerminalCore/TerminalApi.cpp
Lines 42 to 47 in 9edf55d
Potentially regressed in #13024 (/cc @j4james)
The text was updated successfully, but these errors were encountered: