x := list.Size().X
text := splitByNChars(s, x-2)
for _, t := range text {
list = append(list, t)
list.ScrollDown()
}
ui.Render(w.L)
func splitByNChars(s string, n int) []string {
var result []string
for i := 0; i < len(s); i += n {
end := i + n
if end > len(s) {
end = len(s)
}
result = append(result, s[i:end])
}
return result
}