mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-06 14:06:32 -04:00
Set the caption of an integration test on the UI thread
An integration test sets its caption in the options view from the test's own goroutine, while the UI thread may be drawing that view. The race detector reports this now and then, and fails whichever test happens to be running. Set the caption on the UI thread instead. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b8a7dc7d3c
commit
4ac61d6c21
@@ -266,12 +266,12 @@ func (self *GuiDriver) TopViewInWindow(windowName string) *gocui.View {
|
||||
}
|
||||
|
||||
func (self *GuiDriver) SetCaption(caption string) {
|
||||
self.gui.setCaption(caption)
|
||||
self.OnUIThreadAndWait(func() { self.gui.setCaption(caption) })
|
||||
self.waitTillIdle()
|
||||
}
|
||||
|
||||
func (self *GuiDriver) SetCaptionPrefix(prefix string) {
|
||||
self.gui.setCaptionPrefix(prefix)
|
||||
self.OnUIThreadAndWait(func() { self.gui.setCaptionPrefix(prefix) })
|
||||
self.waitTillIdle()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user