@@ -104,17 +104,34 @@ func (s *splitPaneLayout) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
104104 return s, tea.Batch(cmds...)
105105}
106106
107−func (s *splitPaneLayout) View() tea.View {
107+func (s *splitPaneLayout) Cursor() *tea.Cursor {
108+ if s.bottomPanel != nil {
109+ if c, ok := s.bottomPanel.(util.Cursor); ok {
110+ return c.Cursor()
111+ }
112+ } else if s.rightPanel != nil {
113+ if c, ok := s.rightPanel.(util.Cursor); ok {
114+ return c.Cursor()
115+ }
116+ } else if s.leftPanel != nil {
117+ if c, ok := s.leftPanel.(util.Cursor); ok {
118+ return c.Cursor()
119+ }
120+ }
121+ return nil
122+}
123+
124+func (s *splitPaneLayout) View() string {
108125 var topSection string
109126
110127 if s.leftPanel != nil && s.rightPanel != nil {
111128 leftView := s.leftPanel.View()
112129 rightView := s.rightPanel.View()
113− topSection = lipgloss.JoinHorizontal(lipgloss.Top, leftView.String(), rightView.String())
130+ topSection = lipgloss.JoinHorizontal(lipgloss.Top, leftView, rightView)
114131 } else if s.leftPanel != nil {
115− topSection = s.leftPanel.View().String()
132+ topSection = s.leftPanel.View()
116133 } else if s.rightPanel != nil {
117− topSection = s.rightPanel.View().String()
134+ topSection = s.rightPanel.View()
118135 } else {
119136 topSection = ""
120137 }
@@ -123,32 +140,20 @@ func (s *splitPaneLayout) View() tea.View {
123140
124141 if s.bottomPanel != nil && topSection != "" {
125142 bottomView := s.bottomPanel.View()
126− finalView = lipgloss.JoinVertical(lipgloss.Left, topSection, bottomView.String())
143+ finalView = lipgloss.JoinVertical(lipgloss.Left, topSection, bottomView)
127144 } else if s.bottomPanel != nil {
128− finalView = s.bottomPanel.View().String()
145+ finalView = s.bottomPanel.View()
129146 } else {
130147 finalView = topSection
131148 }
132149
133− // TODO: think of a better way to handle multiple cursors
134− var cursor *tea.Cursor
135− if s.bottomPanel != nil {
136− cursor = s.bottomPanel.View().Cursor()
137− } else if s.rightPanel != nil {
138− cursor = s.rightPanel.View().Cursor()
139− } else if s.leftPanel != nil {
140− cursor = s.leftPanel.View().Cursor()
141− }
142−
143150 t := styles.CurrentTheme()
144151
145152 style := t.S().Base.
146153 Width(s.width).
147154 Height(s.height)
148155
149− view := tea.NewView(style.Render(finalView))
150− view.SetCursor(cursor)
151− return view
156+ return style.Render(finalView)
152157}
153158
154159func (s *splitPaneLayout) SetSize(width, height int) tea.Cmd {