MCPcopy
hub / github.com/mathaou/termdbms / SetCursorMode

Method SetCursorMode

tuiutil/textinput.go:253–260  ·  view source on GitHub ↗

SetCursorMode CursorMode sets the model's cursor mode. This method returns a command. For available cursor modes, see type CursorMode.

(mode CursorMode)

Source from the content-addressed store, hash-verified

251//
252// For available cursor modes, see type CursorMode.
253func (m *TextInputModel) SetCursorMode(mode CursorMode) tea.Cmd {
254 m.cursorMode = mode
255 m.blink = m.cursorMode == CursorHide || !m.Focus
256 if mode == CursorBlink {
257 return Blink
258 }
259 return nil
260}
261
262// cursorEnd moves the cursor to the end of the input field and returns whether
263// the cursor should blink should reset.

Callers 1

HandleWindowSizeEventsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected