Browse Source

include newline between messages when copying

Dax Raad 7 months ago
parent
commit
b8620395cb
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/tui/internal/components/chat/messages.go

+ 4 - 0
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")