We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba7c9b8 commit ee06e98Copy full SHA for ee06e98
1 file changed
examples/textarea/main.go
@@ -92,10 +92,12 @@ func (m model) View() tea.View {
92
if !m.textarea.VirtualCursor() {
93
c = m.textarea.Cursor()
94
95
- // Set the y offset of the cursor based on the position of the textarea
96
- // in the application.
97
- offset := lipgloss.Height(m.headerView())
98
- c.Y += offset
+ if c != nil {
+ // Set the y offset of the cursor based on the position of the textarea
+ // in the application.
+ offset := lipgloss.Height(m.headerView())
99
+ c.Y += offset
100
+ }
101
}
102
103
f := strings.Join([]string{
0 commit comments