summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Sardana <himanshusardana2005@gmail.com>2026-03-28 00:28:20 +0000
committerHimanshu Sardana <himanshusardana2005@gmail.com>2026-03-28 00:28:20 +0000
commit29f1dffc7c2cab345d39920ca84d248d8c2c4f99 (patch)
tree773a398072d2537217e585a0b2537652fc0dc4a6
parent4f07893631c5e94f0ed65010984a3e0dda73693a (diff)
fix: theme selection list enter key works
-rw-r--r--cmd/init.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/init.go b/cmd/init.go
index de2c123..ae65562 100644
--- a/cmd/init.go
+++ b/cmd/init.go
@@ -89,6 +89,13 @@ func (i listItem) FilterValue() string { return i.title }
func (m *InitModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if m.step == 5 {
+ if keyMsg, ok := msg.(tea.KeyMsg); ok && keyMsg.String() == "enter" {
+ selected := m.themeList.SelectedItem().(listItem)
+ m.theme = selected.title
+ m.step++
+ m.finished = true
+ return m, tea.Quit
+ }
var cmd tea.Cmd
m.themeList, cmd = m.themeList.Update(msg)
return m, cmd