summaryrefslogtreecommitdiffstats
path: root/view_helpers.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-07-21 18:37:00 +1000
committerJesse Duffield <jessedduffield@gmail.com>2018-07-21 18:37:00 +1000
commitd832eab20cfa1cd9353a57e4218632af455b32ca (patch)
tree655ea784b5d661273b79574bb9760ea705bbe072 /view_helpers.go
parentfab194e9239c28e20191848c1d6a9c7b4f4c7fc6 (diff)
loading animation for confirmation view
Diffstat (limited to 'view_helpers.go')
-rw-r--r--view_helpers.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/view_helpers.go b/view_helpers.go
index dd43aeade..b822e73e2 100644
--- a/view_helpers.go
+++ b/view_helpers.go
@@ -162,8 +162,10 @@ func correctCursor(v *gocui.View) error {
func renderString(g *gocui.Gui, viewName, s string) error {
g.Update(func(*gocui.Gui) error {
v, err := g.View(viewName)
+ // just in case the view disappeared as this function was called, we'll
+ // silently return if it's not found
if err != nil {
- panic(err)
+ return nil
}
v.Clear()
fmt.Fprint(v, s)