We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5082ae6 commit 10962afCopy full SHA for 10962af
textinput/textinput.go
@@ -233,9 +233,14 @@ func (m Model) Focused() bool {
233
234
// Focus sets the focus state on the model. When the model is in focus it can
235
// receive keyboard input and the cursor will be hidden.
236
-func (m *Model) Focus() {
+func (m *Model) Focus() tea.Cmd {
237
m.focus = true
238
m.blink = m.cursorMode == CursorHide // show the cursor unless we've explicitly hidden it
239
+
240
+ if m.cursorMode == CursorBlink && m.focus {
241
+ return m.blinkCmd()
242
+ }
243
+ return nil
244
}
245
246
// Blur removes the focus state on the model. When the model is blurred it can
0 commit comments