From 2e30226da8879b2f7bf67fa83fb179cde72a9a2e Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Wed, 6 Aug 2025 20:49:32 +0200 Subject: [PATCH] fix: handle compact mode --- internal/tui/page/chat/chat.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/internal/tui/page/chat/chat.go b/internal/tui/page/chat/chat.go index 0276ab2a917bf9225d381b483f403d064fefe39a..4d5bd758a0bd54154f06f92f6940746f4a6bc9fb 100644 --- a/internal/tui/page/chat/chat.go +++ b/internal/tui/page/chat/chat.go @@ -166,6 +166,9 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) { p.keyboardEnhancements = msg return p, nil case tea.MouseWheelMsg: + if p.compact { + msg.Y -= 1 + } if p.isMouseOverChat(msg.X, msg.Y) { u, cmd := p.chat.Update(msg) p.chat = u.(chat.MessageListCmp) @@ -173,6 +176,9 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } return p, nil case tea.MouseClickMsg: + if p.compact { + msg.Y -= 1 + } if p.isMouseOverChat(msg.X, msg.Y) { p.focusedPane = PanelTypeChat p.chat.Focus() @@ -186,6 +192,9 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) { p.chat = u.(chat.MessageListCmp) return p, cmd case tea.MouseMotionMsg: + if p.compact { + msg.Y -= 1 + } if msg.Button == tea.MouseLeft { u, cmd := p.chat.Update(msg) p.chat = u.(chat.MessageListCmp) @@ -193,6 +202,9 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } return p, nil case tea.MouseReleaseMsg: + if p.compact { + msg.Y -= 1 + } if msg.Button == tea.MouseLeft { u, cmd := p.chat.Update(msg) p.chat = u.(chat.MessageListCmp)