fix: blank screen after returning from exec shell#781
Open
daresTheDevil wants to merge 1 commit intojesseduffield:masterfrom
Open
fix: blank screen after returning from exec shell#781daresTheDevil wants to merge 1 commit intojesseduffield:masterfrom
daresTheDevil wants to merge 1 commit intojesseduffield:masterfrom
Conversation
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 jesseduffield#611
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what's broken
after exec-ing into a container (
shift+e) and exiting (ctrl+d), the screen goes completely blank. only way to recover is killing and relaunching lazydocker. happens on kitty, warp, and wsl, basically any modern terminal.why it happens
gocui's
Resume()callstcell.Screen.Resume()which re-engages the terminal, but tcell's internal cell cache still thinks the old pre-suspend content is on screen. when gocui tries to redraw, it diffs against that stale cache, decides nothing changed, and writes nothing. blank screen.the fix
one line:
g.screen.Sync()afterResume(). this invalidates tcell's cache so the next draw cycle does a full repaint instead of diffing against stale data.credit to @AbrhamSayd who identified the root cause and opened the upstream fix at jesseduffield/gocui#101. this PR applies the same fix directly to lazydocker's vendored gocui so it can ship without waiting on an upstream merge.
tested
fixes #611