Skip to content
Myr

fix(examples): resolve nil pointer dereference (#1663)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Matthew Caswell · committed by GitHub · parent ba7c9b8 · Browse files · 1 file+6 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−4 removed

  • other:+6 added−4 removed

1 file+6 added−4 removed

modified:examples/textarea/main.go+6 added-4 removed
90 unmodified lines
91 var c *tea.Cursor92 if !m.textarea.VirtualCursor() {93 c = m.textarea.Cursor()9495 if c != nil {95 // Set the y offset of the cursor based on the position of the textarea96 // in the application.97 offset := lipgloss.Height(m.headerView())98 c.Y += offset96 // Set the y offset of the cursor based on the position of the textarea97 // in the application.98 offset := lipgloss.Height(m.headerView())99 c.Y += offset100 }101 }102103 f := strings.Join([]string{104 m.headerView(),
8 unmodified lines