mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-13 22:17:05 +02:00
restore highlighting of popup messages
This commit is contained in:
parent
e68093fe99
commit
d3b6acf096
@ -6,6 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/jesseduffield/gocui"
|
"github.com/jesseduffield/gocui"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/gui/style"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||||
"github.com/jesseduffield/lazygit/pkg/theme"
|
"github.com/jesseduffield/lazygit/pkg/theme"
|
||||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||||
@ -204,7 +205,7 @@ func (gui *Gui) createPopupPanel(opts types.CreatePopupPanelOpts) error {
|
|||||||
textArea.TypeString(opts.Prompt)
|
textArea.TypeString(opts.Prompt)
|
||||||
confirmationView.RenderTextArea()
|
confirmationView.RenderTextArea()
|
||||||
} else {
|
} else {
|
||||||
if err := gui.renderString(confirmationView, opts.Prompt); err != nil {
|
if err := gui.renderString(confirmationView, style.AttrBold.Sprint(opts.Prompt)); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,8 @@ func (self *RealPopupHandler) ErrorMsg(message string) error {
|
|||||||
self.index++
|
self.index++
|
||||||
self.Unlock()
|
self.Unlock()
|
||||||
|
|
||||||
coloredMessage := style.FgRed.Sprint(strings.TrimSpace(message))
|
// Need to set bold here explicitly; otherwise it gets cancelled by the red colouring.
|
||||||
|
coloredMessage := style.FgRed.SetBold().Sprint(strings.TrimSpace(message))
|
||||||
if err := self.onErrorFn(); err != nil {
|
if err := self.onErrorFn(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user