From 02b3930ef99feb9238a53f13c84b274cfd939ccf Mon Sep 17 00:00:00 2001 From: piotr Date: Mon, 16 May 2022 01:01:25 +0200 Subject: [PATCH] trim string, not runes #62 --- uicomponents.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uicomponents.go b/uicomponents.go index 011ad7f..5b8a567 100644 --- a/uicomponents.go +++ b/uicomponents.go @@ -259,8 +259,8 @@ func flowBoxButton(entry desktopEntry) *gtk.Button { terminal := entry.Terminal desc := entry.CommentLoc if len(desc) > 120 { - r := []rune(desc) - desc = string(r[:117]) + r := []rune(desc[:117]) + desc = string(r) desc = fmt.Sprintf("%s…", desc) } button.Connect("button-release-event", func(btn *gtk.Button, e *gdk.Event) bool {