summaryrefslogtreecommitdiff
path: root/menu/search.go
blob: 79cc03b25f0456aa11886b8112a4525877cb3153 (plain)
1
2
3
4
5
6
7
8
9
10
11
package menu

import "strings"

func (m *Model) AddSearch(croppedInput string) string {
	lines := strings.Split(croppedInput, "\n")
	lastIndex := len(lines) - 1
	view := m.Search.View()
	lines[lastIndex] = view
	return strings.Join(lines, "\n")
}