1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-19 00:28:03 +02:00

Bump gocui

This commit is contained in:
Stefan Haller
2023-12-09 15:23:40 +01:00
parent ca4b8b25f0
commit a46f26e148
370 changed files with 1270 additions and 2567 deletions

View File

@ -1166,6 +1166,29 @@ func (g *Gui) flush() error {
return nil
}
func (g *Gui) ForceLayoutAndRedraw() error {
return g.flush()
}
// force redrawing one or more views outside of the normal main loop. Useful during longer
// operations that block the main thread, to update a spinner in a status view.
func (g *Gui) ForceRedrawViews(views ...*View) error {
for _, m := range g.managers {
if err := m.Layout(g); err != nil {
return err
}
}
for _, v := range views {
if err := v.draw(); err != nil {
return err
}
}
Screen.Show()
return nil
}
// draw manages the cursor and calls the draw function of a view.
func (g *Gui) draw(v *View) error {
if g.suspended {

View File

@ -948,12 +948,12 @@ func (v *View) draw() error {
v.writeMutex.Lock()
defer v.writeMutex.Unlock()
v.clearRunes()
if !v.Visible {
return nil
}
v.clearRunes()
v.updateSearchPositions()
maxX, maxY := v.Size()