1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-05 00:59:19 +02:00

bump gocui to fix resizing issue

This commit is contained in:
Jesse Duffield
2021-04-12 21:10:56 +10:00
parent 5453b71fd1
commit 0df6ac6140
5 changed files with 16 additions and 6 deletions

View File

@ -651,14 +651,23 @@ func (g *Gui) handleEvent(ev *GocuiEvent) error {
return g.onKey(ev)
case eventError:
return ev.Err
// Not sure if this should be handled. It acts weirder when it's here
// case eventResize:
// return Sync()
case eventResize:
g.onResize()
return nil
default:
return nil
}
}
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
// g.screen.Sync()
}
// flush updates the gui, re-drawing frames and buffers.
func (g *Gui) flush() error {
// pretty sure we don't need this, but keeping it here in case we get weird visual artifacts

View File

@ -683,7 +683,6 @@ func (v *View) FlushStaleCells() {
v.writeMutex.Lock()
defer v.writeMutex.Unlock()
v.rewind()
v.tainted = true
v.viewLines = nil
}