From 76211eea68fd45c78180108198688cf76d6ffa0b Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 7 May 2026 08:43:10 +0200 Subject: [PATCH] Remove Render() from ListContextTrait.HandleRender self.c.Render() at the end of HandleRender was there to schedule a gocui Update tick so the view content modified above would actually get drawn. For UI-thread callers (the great majority -- keybinding handlers, the layout function itself, popup resize, etc.) this was unnecessary work, since gocui already runs a layout/redraw cycle after every event. SimpleContext.HandleRender doesn't call Render() either, so this aligns the two implementations. The few callers that drove HandleRender from a worker goroutine and relied on Render() for the flush were wrapped in OnUIThread in the preceding commits, so the implicit Render is no longer needed. Also, Render() being called *before* setFooter() looks like it might have been a theoretical race; this is no longer an issue now. --- pkg/gui/context/list_context_trait.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/gui/context/list_context_trait.go b/pkg/gui/context/list_context_trait.go index 98833fdb2..597fc99df 100644 --- a/pkg/gui/context/list_context_trait.go +++ b/pkg/gui/context/list_context_trait.go @@ -124,7 +124,6 @@ func (self *ListContextTrait) HandleRender() { content := self.renderLines(-1, -1) self.GetViewTrait().SetContent(content) } - self.c.Render() self.setFooter() }