1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-26 09:00:57 +02:00

add FIXME note about trimming the trailing newline upon confirming in a prompt panel

This commit is contained in:
Jesse Duffield 2018-08-10 23:08:03 +10:00
parent aa4160d57a
commit f20121cb0b

View File

@ -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
}