summaryrefslogtreecommitdiff
path: root/menu/search.go
diff options
context:
space:
mode:
Diffstat (limited to 'menu/search.go')
-rw-r--r--menu/search.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/menu/search.go b/menu/search.go
new file mode 100644
index 0000000..79cc03b
--- /dev/null
+++ b/menu/search.go
@@ -0,0 +1,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")
+}