@@ -209,11 +209,15 @@ func (m *messageCmp) renderUserMessage() string {
209 for _, attachment := range m.message.BinaryContent() {
209 for _, attachment := range m.message.BinaryContent() {
210 file := filepath.Base(attachment.Path)
210 file := filepath.Base(attachment.Path)
211 var filename string
211 var filename string
212− if len(file) > 10 {
212+ runes := []rune(file)
214+ const truncatePathAt = 7
215+ if len(runes) > truncatePathAt {
213− filename = fmt.Sprintf(" %s %s... ", styles.DocumentIcon, file[0:7])
216+ filename = fmt.Sprintf(" %s %s... ", styles.DocumentIcon, string(runes[0:truncatePathAt]))
215 filename = fmt.Sprintf(" %s %s ", styles.DocumentIcon, file)
218 filename = fmt.Sprintf(" %s %s ", styles.DocumentIcon, file)
217 attachments = append(attachments, attachmentStyles.Render(filename))
221 attachments = append(attachments, attachmentStyles.Render(filename))