From b05172a22e2718c57705a7ee7f402075fbbe5b83 Mon Sep 17 00:00:00 2001 From: Himadri Bhattacharjee <107522312+lavafroth@users.noreply.github.com> Date: Wed, 10 Sep 2025 12:12:17 +0530 Subject: [PATCH] feat: close input box when esc is pressed --- main.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 920c80a..74c2360 100644 --- a/main.go +++ b/main.go @@ -8,20 +8,15 @@ import ( "strings" "time" - // "io" "log" "os" - // "os/exec" - // "strings" - "github.com/charmbracelet/bubbles/list" "github.com/charmbracelet/bubbles/textinput" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" "github.com/go-git/go-git/v6" "github.com/go-git/go-git/v6/plumbing/object" - // "golang.org/x/term" ) var docStyle = lipgloss.NewStyle().Margin(1, 2) @@ -73,6 +68,8 @@ func (m Model) TextUpdate(msg tea.Msg) (tea.Model, tea.Cmd) { m.ChangeDate() m.FetchGitLog() m.chosen = nil + case tea.KeyEsc: + m.chosen = nil } }