mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-16 01:43:21 +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()
|
cmd := m.BlinkCmd()
|
||||||
return m, cmd
|
return m, cmd
|
||||||
|
|
||||||
|
case tea.FocusMsg:
|
||||||
|
return m, m.Focus()
|
||||||
|
|
||||||
|
case tea.BlurMsg:
|
||||||
|
m.Blur()
|
||||||
|
return m, nil
|
||||||
|
|
||||||
case BlinkMsg:
|
case BlinkMsg:
|
||||||
// We're choosy about whether to accept blinkMsgs so that our cursor
|
// We're choosy about whether to accept blinkMsgs so that our cursor
|
||||||
// only exactly when it should.
|
// only exactly when it should.
|
||||||
|
|||||||
Reference in New Issue
Block a user