1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

specify upstream when pushing a branch for the first time

This commit is contained in:
Jesse Duffield
2019-11-11 23:22:09 +11:00
parent 6843741d9e
commit 12b84307ac
10 changed files with 46 additions and 21 deletions

View File

@@ -64,13 +64,16 @@ func (gui *Gui) getConfirmationPanelDimensions(g *gocui.Gui, wrap bool, prompt s
height/2 + panelHeight/2
}
func (gui *Gui) createPromptPanel(g *gocui.Gui, currentView *gocui.View, title string, handleConfirm func(*gocui.Gui, *gocui.View) error) error {
func (gui *Gui) createPromptPanel(g *gocui.Gui, currentView *gocui.View, title string, initialContent string, handleConfirm func(*gocui.Gui, *gocui.View) error) error {
gui.onNewPopupPanel()
confirmationView, err := gui.prepareConfirmationPanel(currentView, title, "", false)
confirmationView, err := gui.prepareConfirmationPanel(currentView, title, initialContent, false)
if err != nil {
return err
}
confirmationView.Editable = true
if err := gui.renderString(g, "confirmation", initialContent); err != nil {
return err
}
// in the future we might want to give createPromptPanel the returnFocusOnClose arg too, but for now we're always setting it to true
return gui.setKeyBindings(g, handleConfirm, nil, true)
}