summaryrefslogtreecommitdiffhomepage
path: root/packages/tui
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-07-21 11:22:51 -0400
committerDax Raad <[email protected]>2025-07-21 11:22:51 -0400
commitb8620395cbddba9fd2ba42ada2db55a81822eaa4 (patch)
tree135ce33770ff7bdd32775786f12b6cb1850e23ce /packages/tui
parent90d37c98f8f80380d889d74ee97dce0539891424 (diff)
downloadopencode-b8620395cbddba9fd2ba42ada2db55a81822eaa4.tar.gz
opencode-b8620395cbddba9fd2ba42ada2db55a81822eaa4.zip
include newline between messages when copying
Diffstat (limited to 'packages/tui')
-rw-r--r--packages/tui/internal/components/chat/messages.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/tui/internal/components/chat/messages.go b/packages/tui/internal/components/chat/messages.go
index b857c4594..d0be14b7f 100644
--- a/packages/tui/internal/components/chat/messages.go
+++ b/packages/tui/internal/components/chat/messages.go
@@ -516,6 +516,10 @@ func (m *messagesComponent) renderView() tea.Cmd {
}
final = append(final, line)
}
+ y := len(final)
+ if selection != nil && y >= selection.startY && y < selection.endY {
+ clipboard = append(clipboard, "")
+ }
final = append(final, "")
}
content := "\n" + strings.Join(final, "\n")