mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-19 00:28:03 +02:00
fix glitchy render of stale data when flicking through files and directories
This commit is contained in:
15
vendor/github.com/jesseduffield/gocui/gui.go
generated
vendored
15
vendor/github.com/jesseduffield/gocui/gui.go
generated
vendored
@ -403,6 +403,21 @@ func (g *Gui) SetViewOnTopOf(toMove string, other string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// replaces the content in toView with the content in fromView
|
||||
func (g *Gui) CopyContent(fromView *View, toView *View) {
|
||||
g.Mutexes.ViewsMutex.Lock()
|
||||
defer g.Mutexes.ViewsMutex.Unlock()
|
||||
|
||||
toView.clear()
|
||||
|
||||
toView.lines = fromView.lines
|
||||
toView.viewLines = fromView.viewLines
|
||||
toView.ox = fromView.ox
|
||||
toView.oy = fromView.oy
|
||||
toView.cx = fromView.cx
|
||||
toView.cy = fromView.cy
|
||||
}
|
||||
|
||||
// Views returns all the views in the GUI.
|
||||
func (g *Gui) Views() []*View {
|
||||
return g.views
|
||||
|
Reference in New Issue
Block a user