diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-07 21:19:38 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-10 00:23:01 +1100 |
commit | 79e59d5460d838203bc79ac86c0ba529305ba2a9 (patch) | |
tree | 7a7d6c48440f02945599606494ac64424d274f58 /pkg/gui/confirmation_panel.go | |
parent | ba4c3e5bc475a7819fd954985105073ba239bf9e (diff) |
add some safe goroutines
WIP
Diffstat (limited to 'pkg/gui/confirmation_panel.go')
-rw-r--r-- | pkg/gui/confirmation_panel.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/confirmation_panel.go b/pkg/gui/confirmation_panel.go index 135ac782f..ee1b1bab7 100644 --- a/pkg/gui/confirmation_panel.go +++ b/pkg/gui/confirmation_panel.go @@ -189,14 +189,14 @@ func (gui *Gui) createPopupPanel(opts createPopupPanelOpts) error { } confirmationView.Editable = opts.editable if opts.editable { - go func() { + go utils.Safe(func() { // TODO: remove this wait (right now if you remove it the EditGotoToEndOfLine method doesn't seem to work) time.Sleep(time.Millisecond) gui.g.Update(func(g *gocui.Gui) error { confirmationView.EditGotoToEndOfLine() return nil }) - }() + }) } gui.renderString("confirmation", opts.prompt) |