MCPcopy Index your code
hub / github.com/codehamr/codehamr / typeInto

Function typeInto

internal/tui/tui_test.go:230–237  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

228// typeInto feeds text one rune at a time, as a keyboard would, exercising the
229// refreshSuggest hook on the KeyRunes fall-through.
230func 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
239func suggestNames(m Model) []string {
240 out := make([]string, 0, len(m.suggest))

Calls 1

UpdateMethod · 0.95

Tested by

no test coverage detected