MCPcopy
hub / github.com/jesseduffield/lazygit / setupViews

Function setupViews

pkg/gocui/flush_test.go:25–40  ·  view source on GitHub ↗

setupViews creates a few views and does an initial full flush so all views start in a clean (non-tainted) state.

(t *testing.T, g *Gui)

Source from the content-addressed store, hash-verified

23// setupViews creates a few views and does an initial full flush so all views
24// start in a clean (non-tainted) state.
25func setupViews(t *testing.T, g *Gui) (*View, *View) {
26 t.Helper()
27
28 status, _ := g.SetView("status", 0, 22, 40, 24, 0)
29 status.Frame = false
30 main, _ := g.SetView("main", 0, 0, 80, 22, 0)
31
32 // Initial content
33 status.SetContent("Ready")
34 main.SetContent("hello world")
35
36 // Full flush to draw everything and clear tainted flags
37 assert.NoError(t, g.flush())
38
39 return status, main
40}
41
42// pushContentOnly pushes a content-only event directly to the channel
43// (synchronous, deterministic — unlike Update which spawns a goroutine).

Calls 3

SetViewMethod · 0.80
flushMethod · 0.80
SetContentMethod · 0.65

Tested by

no test coverage detected