1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-13 01:30:53 +02:00

Merge pull request #2146 from Ryooooooga/fix-initial-origin-editor

This commit is contained in:
Jesse Duffield
2022-09-07 15:54:57 -07:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@ -181,6 +181,7 @@ func (gui *Gui) createPopupPanel(opts types.CreatePopupPanelOpts) error {
textArea := confirmationView.TextArea
textArea.Clear()
textArea.TypeString(opts.Prompt)
gui.resizeConfirmationPanel()
confirmationView.RenderTextArea()
} else {
if err := gui.renderString(confirmationView, style.AttrBold.Sprint(opts.Prompt)); err != nil {

View File

@ -87,7 +87,11 @@ func (gui *Gui) resizeConfirmationPanel() {
}
panelWidth := gui.getConfirmationPanelWidth()
prompt := gui.Views.Confirmation.Buffer()
wrap := !gui.Views.Confirmation.Editable
wrap := true
if gui.Views.Confirmation.Editable {
prompt = gui.Views.Confirmation.TextArea.GetContent()
wrap = false
}
panelHeight := gui.getMessageHeight(wrap, prompt, panelWidth) + suggestionsViewHeight
x0, y0, x1, y1 := gui.getConfirmationPanelDimensionsAux(panelWidth, panelHeight)
confirmationViewBottom := y1 - suggestionsViewHeight