fix(ui): only copy chat highlight when we have highlighted content

Ayman Bagabas created

Change summary

internal/ui/model/ui.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

internal/ui/model/ui.go 🔗

@@ -549,7 +549,7 @@ func (m *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 			// Adjust for chat area position
 			x -= m.layout.main.Min.X
 			y -= m.layout.main.Min.Y
-			if m.chat.HandleMouseUp(x, y) {
+			if m.chat.HandleMouseUp(x, y) && m.chat.HasHighlight() {
 				cmds = append(cmds, tea.Tick(doubleClickThreshold, func(t time.Time) tea.Msg {
 					if time.Since(m.lastClickTime) >= doubleClickThreshold {
 						return copyChatHighlightMsg{}