typeInto feeds text one rune at a time, as a keyboard would, exercising the refreshSuggest hook on the KeyRunes fall-through.
(m Model, text string)
| 228 | // typeInto feeds text one rune at a time, as a keyboard would, exercising the |
| 229 | // refreshSuggest hook on the KeyRunes fall-through. |
| 230 | func typeInto(m Model, text string) Model { |
| 231 | var mm tea.Model = m |
| 232 | for _, r := range text { |
| 233 | out, _ := mm.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{r}}) |
| 234 | mm = out |
| 235 | } |
| 236 | return mm.(Model) |
| 237 | } |
| 238 | |
| 239 | func suggestNames(m Model) []string { |
| 240 | out := make([]string, 0, len(m.suggest)) |
no test coverage detected