@@ -3,6 +3,7 @@ package tui
7 "github.com/charmbracelet/bubbles/v2/key"
8 "github.com/charmbracelet/bubbles/v2/key"
8 tea "github.com/charmbracelet/bubbletea/v2"
9 tea "github.com/charmbracelet/bubbletea/v2"
@@ -447,6 +448,11 @@ func (a *appModel) View() tea.View {
447 var cursor *tea.Cursor
448 var cursor *tea.Cursor
448 if v, ok := page.(util.Cursor); ok {
449 if v, ok := page.(util.Cursor); ok {
449 cursor = v.Cursor()
450 cursor = v.Cursor()
451+ // Hide the cursor if it's positioned outside the textarea
452+ statusHeight := a.height - strings.Count(pageView, "\n") + 1
453+ if cursor != nil && cursor.Y+statusHeight+chat.EditorHeight-2 <= a.height { // 2 for the top and bottom app padding
451 activeView := a.dialog.ActiveModel()
457 activeView := a.dialog.ActiveModel()
452 if activeView != nil {
458 if activeView != nil {