diff --git a/pkg/commands/cmd_session.go b/pkg/commands/cmd_session.go index ece190a57..21e7e13f0 100644 --- a/pkg/commands/cmd_session.go +++ b/pkg/commands/cmd_session.go @@ -109,10 +109,11 @@ func sessionLabel(summary, preview string, maxLen int) string { return "(empty)" } text = strings.ReplaceAll(text, "\n", " ") - if len(text) <= maxLen { + runes := []rune(text) + if len(runes) <= maxLen { return text } - return text[:maxLen] + "..." + return string(runes[:maxLen]) + "..." } // extractSessionTag returns the "#N" suffix from a session key, or "#1" for