aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/gizak/termui/canvas.go
diff options
context:
space:
mode:
Diffstat (limited to 'Godeps/_workspace/src/github.com/gizak/termui/canvas.go')
-rw-r--r--Godeps/_workspace/src/github.com/gizak/termui/canvas.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/canvas.go b/Godeps/_workspace/src/github.com/gizak/termui/canvas.go
index 614635ee4..4173780f3 100644
--- a/Godeps/_workspace/src/github.com/gizak/termui/canvas.go
+++ b/Godeps/_workspace/src/github.com/gizak/termui/canvas.go
@@ -1,4 +1,4 @@
-// Copyright 2015 Zack Guo <gizak@icloud.com>. All rights reserved.
+// Copyright 2016 Zack Guo <gizak@icloud.com>. All rights reserved.
// Use of this source code is governed by a MIT license that can
// be found in the LICENSE file.
@@ -63,12 +63,10 @@ func (c Canvas) Unset(x, y int) {
}
// Buffer returns un-styled points
-func (c Canvas) Buffer() []Point {
- ps := make([]Point, len(c))
- i := 0
+func (c Canvas) Buffer() Buffer {
+ buf := NewBuffer()
for k, v := range c {
- ps[i] = newPoint(v+brailleBase, k[0], k[1])
- i++
+ buf.Set(k[0], k[1], Cell{Ch: v + brailleBase})
}
- return ps
+ return buf
}