Skip to content
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

Renderers (Metal and OpenGL) should clip terminal if terminal grid size mismatches physical window #4523

Open
mitchellh opened this issue Jan 3, 2025 · 0 comments
Labels
Milestone

Comments

@mitchellh
Copy link
Contributor

Both Metal and OpenGL have something like the following:

// If our terminal screen size doesn't match our expected renderer
// size then we skip a frame. This can happen if the terminal state
// is resized between when the renderer mailbox is drained and when
// the state mutex is acquired inside this function.
//
// For some reason this doesn't seem to cause any significant issues
// with flickering while resizing. '\_('-')_/'
if (grid_size.rows != state.terminal.rows or
grid_size.columns != state.terminal.cols)
{
return;
}

In this case, we just stop rendering which makes it look like the terminal is hanging. We should clip the terminal area (if it's bigger than our window) or blank the padding (if it's smaller) in this scenario.

The only known way to trigger this is DECCOLM, so it's low priority since almost nothing uses this. But notably vtetest uses this and it makes it appear like we perform much worse than we do.

@mitchellh mitchellh added this to the 1.0.2 milestone Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant