mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
fix rendering issues caused by resizing
This commit is contained in:
10
vendor/github.com/jesseduffield/gocui/gui.go
generated
vendored
10
vendor/github.com/jesseduffield/gocui/gui.go
generated
vendored
@ -272,7 +272,7 @@ func (g *Gui) SetView(name string, x0, y0, x1, y1 int, overlaps byte) (*View, er
|
||||
|
||||
if v, err := g.View(name); err == nil {
|
||||
if v.x0 != x0 || v.x1 != x1 || v.y0 != y0 || v.y1 != y1 {
|
||||
v.tainted = true
|
||||
v.clearViewLines()
|
||||
}
|
||||
|
||||
v.x0 = x0
|
||||
@ -660,11 +660,7 @@ func (g *Gui) handleEvent(ev *GocuiEvent) error {
|
||||
}
|
||||
|
||||
func (g *Gui) onResize() {
|
||||
for _, v := range g.views {
|
||||
// wonder if we should be calling this in other contexts e.g. whenever the view's dimensions change in general
|
||||
v.FlushStaleCells()
|
||||
}
|
||||
// Not sure if we actually need this
|
||||
// not sure if we actually need this
|
||||
// g.screen.Sync()
|
||||
}
|
||||
|
||||
@ -677,7 +673,7 @@ func (g *Gui) flush() error {
|
||||
// if GUI's size has changed, we need to redraw all views
|
||||
if maxX != g.maxX || maxY != g.maxY {
|
||||
for _, v := range g.views {
|
||||
v.tainted = true
|
||||
v.clearViewLines()
|
||||
}
|
||||
}
|
||||
g.maxX, g.maxY = maxX, maxY
|
||||
|
Reference in New Issue
Block a user