瀏覽代碼

fix: text selection bug (#1664)

Aiden Cline 1 年之前
父節點
當前提交
7950ae1462
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      packages/tui/internal/components/chat/message.go

+ 2 - 2
packages/tui/internal/components/chat/message.go

@@ -219,7 +219,7 @@ func renderText(
 	switch casted := message.(type) {
 	case opencode.AssistantMessage:
 		ts = time.UnixMilli(int64(casted.Time.Created))
-		content = util.ToMarkdown(text, width+2, t.Background())
+		content = util.ToMarkdown(text, width, t.Background())
 	case opencode.UserMessage:
 		ts = time.UnixMilli(int64(casted.Time.Created))
 		base := styles.NewStyle().Foreground(t.Text()).Background(backgroundColor)
@@ -302,7 +302,7 @@ func renderText(
 		return renderContentBlock(
 			app,
 			content,
-			width+2,
+			width,
 			WithNoBorder(),
 			WithBackgroundColor(t.Background()),
 		)