mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-20 05:19:24 +02:00
fix(confirmation_panel.go): fix initial origin of editor box
This commit is contained in:
parent
448ff80d7d
commit
eb9fbb0a33
@ -181,6 +181,7 @@ func (gui *Gui) createPopupPanel(opts types.CreatePopupPanelOpts) error {
|
|||||||
textArea := confirmationView.TextArea
|
textArea := confirmationView.TextArea
|
||||||
textArea.Clear()
|
textArea.Clear()
|
||||||
textArea.TypeString(opts.Prompt)
|
textArea.TypeString(opts.Prompt)
|
||||||
|
gui.resizeConfirmationPanel()
|
||||||
confirmationView.RenderTextArea()
|
confirmationView.RenderTextArea()
|
||||||
} else {
|
} else {
|
||||||
if err := gui.renderString(confirmationView, style.AttrBold.Sprint(opts.Prompt)); err != nil {
|
if err := gui.renderString(confirmationView, style.AttrBold.Sprint(opts.Prompt)); err != nil {
|
||||||
|
@ -87,7 +87,11 @@ func (gui *Gui) resizeConfirmationPanel() {
|
|||||||
}
|
}
|
||||||
panelWidth := gui.getConfirmationPanelWidth()
|
panelWidth := gui.getConfirmationPanelWidth()
|
||||||
prompt := gui.Views.Confirmation.Buffer()
|
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
|
panelHeight := gui.getMessageHeight(wrap, prompt, panelWidth) + suggestionsViewHeight
|
||||||
x0, y0, x1, y1 := gui.getConfirmationPanelDimensionsAux(panelWidth, panelHeight)
|
x0, y0, x1, y1 := gui.getConfirmationPanelDimensionsAux(panelWidth, panelHeight)
|
||||||
confirmationViewBottom := y1 - suggestionsViewHeight
|
confirmationViewBottom := y1 - suggestionsViewHeight
|
||||||
|
Loading…
x
Reference in New Issue
Block a user