fix popup panel resizing

This commit is contained in:
Jesse Duffield 2018-09-05 19:07:46 +10:00
parent c1bf1e52b0
commit 422b263df4
6 changed files with 26 additions and 39 deletions

View file

@ -34,15 +34,6 @@ func (gui *Gui) handleCommitClose(g *gocui.Gui, v *gocui.View) error {
}
func (gui *Gui) handleNewlineCommitMessage(g *gocui.Gui, v *gocui.View) error {
// resising ahead of time so that the top line doesn't get hidden to make
// room for the cursor on the second line
x0, y0, x1, y1 := gui.getConfirmationPanelDimensions(g, v.Buffer())
if _, err := g.SetView("commitMessage", x0, y0, x1, y1+1, 0); err != nil {
if err != gocui.ErrUnknownView {
return err
}
}
v.EditNewLine()
return nil
}