X-Git-Url: http://git.giacomolli.uk/onechat/blobdiff_plain/7b6d0a81e0f3c8e33b1b76d5ecbc5bdb25a87249..5a93b6124068c2a8748fc0bfbb2a2d151815bcf0:/view_layout.go diff --git a/view_layout.go b/view_layout.go index 0d4e756..3db2f01 100644 --- a/view_layout.go +++ b/view_layout.go @@ -59,8 +59,11 @@ type ViewLayout struct { // earlier messages up to the first one whose text differs, and puts the rest // of the lines into one new message. func (l *ViewLayout) Split(lines []string) ([]string, error) { - var texts []string - var kept []ViewLayoutMessage + var ( + texts []string + kept []ViewLayoutMessage + ) + start := 0 for _, message := range l.Messages { if start+message.Lines > len(lines) {