summaryrefslogtreecommitdiff
path: root/client/buffer/buffer.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/buffer/buffer.go')
-rw-r--r--client/buffer/buffer.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/buffer/buffer.go b/client/buffer/buffer.go
index b57ec26..921ad00 100644
--- a/client/buffer/buffer.go
+++ b/client/buffer/buffer.go
@@ -31,6 +31,10 @@ func (l List) Next() *List {
return l.next
}
+func (l List) Msg() Message {
+ return l.msg
+}
+
func (b *Buffer) Top() *List {
return b.top
}
@@ -57,7 +61,7 @@ func (b *Buffer) AddTop(msg Message) {
if b.top != nil {
b.top.prev = &l
l.next = b.top
- l.odd = !b.bottom.odd
+ l.odd = !b.top.odd
}
b.top = &l
if b.bottom == nil {