summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/jesseduffield/gocui/gui.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-04-12 21:33:23 +1000
committerJesse Duffield <jessedduffield@gmail.com>2021-04-12 21:48:08 +1000
commit76697280c9d0397d75b6af732a5c0b4617ea7809 (patch)
treed545db399b5d6ff4a48443026b0ce75aa61d23a9 /vendor/github.com/jesseduffield/gocui/gui.go
parent0df6ac61405a1eaec6e7b55174930973dcbecdf0 (diff)
fix rendering issues caused by resizing
Diffstat (limited to 'vendor/github.com/jesseduffield/gocui/gui.go')
-rw-r--r--vendor/github.com/jesseduffield/gocui/gui.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/gui.go b/vendor/github.com/jesseduffield/gocui/gui.go
index f47abf0fc..e5bf8125f 100644
--- a/vendor/github.com/jesseduffield/gocui/gui.go
+++ b/vendor/github.com/jesseduffield/gocui/gui.go
@@ -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