// 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) {