MCPcopy Create free account
hub / github.com/codehamr/codehamr / forwardToTextarea

Method forwardToTextarea

internal/tui/keys.go:93–98  ·  view source on GitHub ↗

forwardToTextarea passes msg to the textarea and refreshes the popover to match. The "let the textarea handle it" fallback shared by handleKey, handleTab, and Alt+Enter.

(msg tea.Msg)

Source from the content-addressed store, hash-verified

91// match. The "let the textarea handle it" fallback shared by handleKey,
92// handleTab, and Alt+Enter.
93func (m Model) forwardToTextarea(msg tea.Msg) (tea.Model, tea.Cmd) {
94 var cmd tea.Cmd
95 m.ta, cmd = m.ta.Update(msg)
96 m.refreshSuggest()
97 return m, cmd
98}
99
100// setPromptText overwrites the textarea, parks the cursor at the end, and
101// refreshes the popover. Centralises the SetValue + CursorEnd + refreshSuggest

Callers 3

handleKeyMethod · 0.95
handleTabMethod · 0.95
handleEnterMethod · 0.95

Calls 2

refreshSuggestMethod · 0.95
UpdateMethod · 0.45

Tested by

no test coverage detected