MCPcopy
hub / github.com/wagoodman/dive / Render

Method Render

runtime/ui/view/status.go:84–103  ·  view source on GitHub ↗

Render flushes the state objects to the screen.

()

Source from the content-addressed store, hash-verified

82
83// Render flushes the state objects to the screen.
84func (v *Status) Render() error {
85 logrus.Tracef("view.Render() %s", v.Name())
86
87 v.gui.Update(func(g *gocui.Gui) error {
88 v.view.Clear()
89
90 var selectedHelp string
91 if v.selectedView != nil {
92 selectedHelp = v.selectedView.KeyHelp()
93 }
94
95 _, err := fmt.Fprintln(v.view, v.KeyHelp()+selectedHelp+format.StatusNormal("▏"+strings.Repeat(" ", 1000)))
96 if err != nil {
97 logrus.Debug("unable to write to buffer: ", err)
98 }
99
100 return err
101 })
102 return nil
103}
104
105// KeyHelp indicates all the possible global actions a user can take when any pane is selected.
106func (v *Status) KeyHelp() string {

Callers 2

SetupMethod · 0.95
OnLayoutChangeMethod · 0.95

Calls 4

NameMethod · 0.95
KeyHelpMethod · 0.95
UpdateMethod · 0.65
KeyHelpMethod · 0.65

Tested by

no test coverage detected