summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/buffers.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/buffers.go b/ui/buffers.go
index a61766c..068894e 100644
--- a/ui/buffers.go
+++ b/ui/buffers.go
@@ -296,10 +296,14 @@ func (bs *bufferList) Resize(width, height int) {
func (bs *bufferList) Next() {
bs.current = (bs.current + 1) % len(bs.list)
+ bs.list[bs.current].highlights = 0
+ bs.list[bs.current].unread = false
}
func (bs *bufferList) Previous() {
bs.current = (bs.current - 1 + len(bs.list)) % len(bs.list)
+ bs.list[bs.current].highlights = 0
+ bs.list[bs.current].unread = false
}
func (bs *bufferList) Add(title string) (ok bool) {
@@ -351,6 +355,10 @@ func (bs *bufferList) AddLine(title string, line Line) {
b.scrollAmt++
}
}
+
+ if !line.isStatus && idx != bs.current {
+ b.unread = true
+ }
}
func (bs *bufferList) AddLines(title string, lines []Line) {