From ac024fff3ce70b435a39de83f7aa3339668fdc6b Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sun, 24 Nov 2024 02:59:00 -0500 Subject: Instant slider animation --- internal/switcher/switcher.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/switcher') diff --git a/internal/switcher/switcher.go b/internal/switcher/switcher.go index eee92df..b534e54 100644 --- a/internal/switcher/switcher.go +++ b/internal/switcher/switcher.go @@ -2,6 +2,7 @@ package switcher import ( "fmt" + "log/slog" "github.com/ChausseBenjamin/termpicker/internal/colors" "github.com/ChausseBenjamin/termpicker/internal/picker" @@ -64,6 +65,7 @@ func (m Model) View() string { func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { keys := newKeybinds() cmds := []tea.Cmd{} + slog.Info("Received tea.Msg", "tea_msg", msg, "type", fmt.Sprintf("%T", msg)) switch msg := msg.(type) { case tea.KeyMsg: switch { @@ -102,6 +104,8 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, tea.Batch(cmds...) } + default: + // fmt.Printf("\nmsg: %T\n", msg) } for i, p := range m.pickers { newActive, cmd := p.Update(msg) -- cgit v1.2.3