From d52856813783fb1c31157ed18f41a869a60e3a80 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Thu, 17 Oct 2019 08:45:16 -0400 Subject: [PATCH] Fix bug where Ctrl+C in edit will close kbtui rather than return to regular views --- main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.go b/main.go index 696fc2d..b0c0432 100644 --- a/main.go +++ b/main.go @@ -120,6 +120,15 @@ func initKeybindings() error { }); err != nil { return err } + if err := g.SetKeybinding("Edit", gocui.KeyCtrlC, gocui.ModNone, + func(g *gocui.Gui, v *gocui.View) error { + popupView("Chat") + popupView("Input") + clearView("Edit") + return nil + }); err != nil { + return err + } if err := g.SetKeybinding("Input", gocui.KeyEnter, gocui.ModNone, func(g *gocui.Gui, v *gocui.View) error { return handleInput("Input")