commit 3c81bbd229bb338addb49b34031e96abcddbbfd0
parent 608e12a601d32797d93a550ac9b33d446f38bf55
Author: David Schlachter <t480-debian-git@schlachter.ca>
Date: Thu, 8 Jan 2026 02:01:54 -0500
Clear screen after adding to Anki
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/main.go b/main.go
@@ -98,6 +98,10 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, nil
case wordAddedMsg:
m.wordAddStatus = fmt.Sprintf("✅ Added '%s' to Anki", string(msg))
+ m.currentWord = ""
+ m.currentDefinition = ""
+ m.wordInput.SetValue("")
+ m.vp.SetContent("")
m.err = nil
case tea.KeyMsg:
switch msg.Type {