mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 04:36:07 +00:00
feat(cursor): focus/blur support (#581)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
@@ -101,6 +101,13 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
|
||||
cmd := m.BlinkCmd()
|
||||
return m, cmd
|
||||
|
||||
case tea.FocusMsg:
|
||||
return m, m.Focus()
|
||||
|
||||
case tea.BlurMsg:
|
||||
m.Blur()
|
||||
return m, nil
|
||||
|
||||
case BlinkMsg:
|
||||
// We're choosy about whether to accept blinkMsgs so that our cursor
|
||||
// only exactly when it should.
|
||||
|
||||
Reference in New Issue
Block a user