summaryrefslogtreecommitdiff
path: root/internal/switcher
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-11-24 02:59:00 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2024-11-24 02:59:00 -0500
commitac024fff3ce70b435a39de83f7aa3339668fdc6b (patch)
tree2e68d5d6c3517770fc8bae1da3e70f53a241e7e3 /internal/switcher
parent56ceae9524f40ac89cd68796d1f8e6cd0560c80a (diff)
Instant slider animation
Diffstat (limited to 'internal/switcher')
-rw-r--r--internal/switcher/switcher.go4
1 files changed, 4 insertions, 0 deletions
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)