From 858ff1806e6ed4b3068b1ed25bef144c50719534 Mon Sep 17 00:00:00 2001 From: David Kay Date: Sat, 21 Mar 2026 00:35:44 -0500 Subject: [PATCH] fix: blank screen after exiting exec shell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- vendor/github.com/jesseduffield/gocui/gui.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/vendor/github.com/jesseduffield/gocui/gui.go b/vendor/github.com/jesseduffield/gocui/gui.go index e2593b985..df3a4470a 100644 --- a/vendor/github.com/jesseduffield/gocui/gui.go +++ b/vendor/github.com/jesseduffield/gocui/gui.go @@ -1546,7 +1546,18 @@ func (g *Gui) Resume() error { 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)