From f20121cb0bca9355d6a08d8d8153b2a34ccf5120 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Fri, 10 Aug 2018 23:08:03 +1000 Subject: [PATCH] add FIXME note about trimming the trailing newline upon confirming in a prompt panel --- confirmation_panel.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confirmation_panel.go b/confirmation_panel.go index 520c8b593..7ae55eaf9 100644 --- a/confirmation_panel.go +++ b/confirmation_panel.go @@ -71,6 +71,8 @@ func createPromptPanel(g *gocui.Gui, currentView *gocui.View, title string, init } handleClose := func(gui *gocui.Gui, view *gocui.View) error { + // FIXME: trimming a newline that is no doubt caused by the enter keybinding + // on the editor. We should just define a new editor that doesn't do that *initialValue = []byte(strings.TrimSpace(view.Buffer())) return nil }