summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorDavid Schlachter <t480-debian-git@schlachter.ca>2026-01-08 02:01:54 -0500
committerDavid Schlachter <t480-debian-git@schlachter.ca>2026-01-08 02:01:54 -0500
commit3c81bbd229bb338addb49b34031e96abcddbbfd0 (patch)
tree46d750a9d21c00763d72559e612a1f62680664ff /main.go
parent608e12a601d32797d93a550ac9b33d446f38bf55 (diff)
Clear screen after adding to Anki
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.go b/main.go
index d5900b7..b404a30 100644
--- 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 {