aboutsummaryrefslogtreecommitdiff
path: root/confirm.go
diff options
context:
space:
mode:
authorAria <me@aria.rip>2023-02-03 15:48:00 +0000
committerAria <me@aria.rip>2023-02-03 15:48:00 +0000
commit15c9b9308d353d558f7c4fc2fe03012afc84be40 (patch)
treefaff8319ffc87d10447274a12751ddc43216649d /confirm.go
parent8c3b1aee5a253416523de78877ae03c3868cc62c (diff)
better error handling
Diffstat (limited to 'confirm.go')
-rw-r--r--confirm.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/confirm.go b/confirm.go
index a7d4748..31ce746 100644
--- a/confirm.go
+++ b/confirm.go
@@ -82,6 +82,9 @@ func (m confirmModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.viewport.Width = msg.Width - padding_h
m.viewport.Height = msg.Height - verticalMarginHeight - padding_v
}
+ case fatalErrorMsg:
+ fmt.Printf("encountered fatal error: %s\n", msg.Error())
+ return m, tea.Quit
}
// Handle keyboard and mouse events in the viewport