tui: fix wrapping

This commit is contained in:
Matt Low 2024-04-01 05:32:05 +00:00
parent 105ee2e01b
commit 39cd4227c6

View File

@ -599,7 +599,7 @@ func (m *chatModel) renderMessage(msg *models.Message) string {
content := strings.TrimRight(sb.String(), "\n") content := strings.TrimRight(sb.String(), "\n")
if m.wrap { if m.wrap {
wrapWidth := m.content.Width - messageStyle.GetHorizontalPadding() - 1 wrapWidth := m.content.Width - messageStyle.GetHorizontalPadding() - 2
content = wordwrap.String(content, wrapWidth) content = wordwrap.String(content, wrapWidth)
} }