fix: mark tab dirty after shell exit#1585
Conversation
Closing a tab by exiting its shell removes the context in the CloseTerminal handler, but that path left the newly active tab with no pending update. The PTY performer already sends a follow-up RioEvent::Render, so a redraw is queued. However, Renderer::run still gates each panel on is_dirty or force_full_damage. When neither flag is set, the frame is discarded and the closed tab remains visible until another action dirties the screen. Mark the new active screen dirty after resizing the tab line. This keeps the shell-exit path aligned with other UI mutation paths without adding another redraw request; the existing Render event supplies that.
|
In simple words: You can now exit your shell with |
There was a problem hiding this comment.
Pull request overview
This PR updates RioTerm’s shell-exit tab-closing path so the window actually redraws after the active context changes. It aligns CloseTerminal handling with the renderer’s dirty-flag gating so exiting a shell no longer leaves the closed tab visible until a later UI event.
Changes:
- Refactors the
CloseTerminalnon-window-close branch to work through a localscreenbinding. - Recomputes the tab-line layout using the remaining context count after a shell exits.
- Marks the newly active screen dirty so the already-scheduled follow-up render is not skipped.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I added a If you have a better idea, feel free to tell me / improve the PR yourself. |
This reverts commit fe66569.
Sorry, my bad. I was testing something else and forgot to include the fix from this PR and got overexcited and added the redraw which is - after testing again - not necessary. |
Closing a tab by exiting its shell removes the context in the CloseTerminal handler, but that path left the newly active tab with no pending update. The PTY performer already sends a follow-up RioEvent::Render, so a redraw is queued. However, Renderer::run still gates each panel on is_dirty or force_full_damage. When neither flag is set, the frame is discarded and the closed tab remains visible until another action dirties the screen.
Mark the new active screen dirty after resizing the tab line. This keeps the shell-exit path aligned with other UI mutation paths without adding another redraw request; the existing Render event supplies that.