From ee61875a549f4b94e2dc4bda4335cc7ac1b73659 Mon Sep 17 00:00:00 2001 From: BC Date: Thu, 3 Oct 2024 22:28:43 -0400 Subject: [PATCH] Fix textinputs example This should fix the textinputs example, as the code is using KeyMsg. KeyMsg seems to have an issue with the v2 alpha where it appears that both KeyPressMsg and KeyReleaseMsg may be unintentionally being called sequentionally. Just using one or the other should solve the issue for this. This issue also likely exists within other examples and may Need to be looked at separately. No PR/Issue Tag atm --- examples/textinputs/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/textinputs/main.go b/examples/textinputs/main.go index 6ae56f77e2..67d48d47cb 100644 --- a/examples/textinputs/main.go +++ b/examples/textinputs/main.go @@ -70,7 +70,7 @@ func (m model) Init() (tea.Model, tea.Cmd) { func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg := msg.(type) { - case tea.KeyMsg: + case tea.KeyPressMsg: switch msg.String() { case "ctrl+c", "esc": return m, tea.Quit