fix: blank screen after exiting exec shell

after exec-ing into a container and ctrl+d-ing out, the screen goes
completely blank. you have to kill and relaunch lazydocker to get it
back. been happening on kitty, warp, and wsl.

the issue is in gocui's Resume() — tcell re-engages the terminal but
its cell cache still thinks the old content is on screen. next redraw
diffs against stale cache, sees "nothing changed", writes nothing.
blank screen.

adding screen.Sync() after Resume() nukes the cache and forces a full
repaint. tested on kitty + orbstack, redraws clean every time.

fixes #611
This commit is contained in:
David Kay 2026-03-21 00:35:44 -05:00
parent 2ebe3848d6
commit 858ff1806e

View file

@ -1546,7 +1546,18 @@ func (g *Gui) Resume() error {
g.suspended = false g.suspended = false
return g.screen.Resume() if err := g.screen.Resume(); err != nil {
return err
}
// Resume() re-engages the terminal but leaves tcell's internal
// "last drawn" cell cache stale. Without Sync(), the next redraw
// diffs against that stale cache, finds nothing changed, and
// writes nothing — leaving the screen blank. Sync() invalidates
// the cache so the next Show() forces a full repaint.
g.screen.Sync()
return nil
} }
// matchView returns if the keybinding matches the current view (and the view's context) // matchView returns if the keybinding matches the current view (and the view's context)