uiterm: add prevention of doing possibly unneeded screen flushes

This commit is contained in:
Tim Cooper
2014-12-06 22:30:16 -04:00
parent 54584f8e30
commit 634e28f2d3
5 changed files with 26 additions and 2 deletions

View File

@@ -30,6 +30,9 @@ func (l *Label) uiSetBounds(x0, y0, x1, y1 int) {
}
func (l *Label) uiDraw() {
l.ui.beginDraw()
defer l.ui.endDraw()
reader := strings.NewReader(l.Text)
for y := l.y0; y < l.y1; y++ {
for x := l.x0; x < l.x1; x++ {