Skip to content

Commit 9e267b5

Browse files
GGPromptsclaude
andcommitted
fix: Clear screen on terminal resize to prevent ghost content
Added tea.ClearScreen to WindowSizeMsg handler to prevent duplicate footer text and other ghost content when resizing the terminal. The old view content could persist if the new view was shorter. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 6c705b8 commit 9e267b5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

update.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
194194
// Reset horizontal scroll on window resize
195195
m.detailScrollX = 0
196196

197+
// Clear screen to prevent ghost content from previous render
198+
// (old content can persist if new view is shorter than old view)
199+
return m, tea.ClearScreen
200+
197201
case tickMsg:
198202
// Background refresh for git repos (every 60 seconds)
199203
if m.showGitReposOnly && !m.gitReposLastScan.IsZero() {

0 commit comments

Comments
 (0)