summaryrefslogtreecommitdiff
path: root/ui/buffers.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/buffers.go')
-rw-r--r--ui/buffers.go18
1 files changed, 13 insertions, 5 deletions
diff --git a/ui/buffers.go b/ui/buffers.go
index 3a17b18..703fd1a 100644
--- a/ui/buffers.go
+++ b/ui/buffers.go
@@ -37,6 +37,7 @@ type Line struct {
Highlight bool
Readable bool
Mergeable bool
+ Temporary bool
Data interface{}
splitPoints []point
@@ -392,9 +393,12 @@ func (bs *BufferList) AddLine(netID, title string, line Line) {
} else {
if n != 0 {
l := &b.lines[n-1]
- if l.Head == line.Head || l.HeadTag == line.Head {
+ if l.Temporary {
+ b.lines = b.lines[:n-1]
+ }
+ if line.HeadTag == l.HeadTag || l.Head == line.Head || l.HeadTag == line.Head {
line.HeadTag = line.Head
- line.Head = ""
+ line.Head = "│"
}
}
line.computeSplitPoints()
@@ -435,9 +439,9 @@ func (bs *BufferList) AddLines(netID, title string, before, after []Line) {
}
if len(lines) > 0 {
l := &lines[len(lines)-1]
- if l.Head == line.Head || l.HeadTag == line.Head {
+ if line.HeadTag == l.HeadTag || l.Head == line.Head || l.HeadTag == line.Head {
line.HeadTag = line.Head
- line.Head = ""
+ line.Head = "│"
}
}
lines = append(lines, line)
@@ -595,6 +599,8 @@ func (bs *BufferList) DrawVerticalBufferList(screen tcell.Screen, x0, y0, width,
st := tcell.StyleDefault
if b.unread {
st = st.Bold(true).Foreground(bs.colors.Unread)
+ } else {
+ st = st.Foreground(bs.colors.ChanForegroundInactive)
}
if bi == bs.current || bi == bs.clicked {
st = st.Reverse(true)
@@ -609,6 +615,7 @@ func (bs *BufferList) DrawVerticalBufferList(screen tcell.Screen, x0, y0, width,
var title string
if b.title == "" {
title = b.netName
+ st.Foreground(bs.colors.ServerForeground)
} else {
if bi == bs.current || bi == bs.clicked {
screen.SetContent(x, y, ' ', nil, tcell.StyleDefault.Reverse(true))
@@ -708,6 +715,7 @@ func (bs *BufferList) DrawHorizontalBufferList(screen tcell.Screen, x0, y0, widt
break
}
st := tcell.StyleDefault
+ st = st.Foreground(bs.colors.ChanForegroundInactive)
if b.unread {
st = st.Bold(true).Foreground(bs.colors.Unread)
} else if i == bs.current {
@@ -719,7 +727,7 @@ func (bs *BufferList) DrawHorizontalBufferList(screen tcell.Screen, x0, y0, widt
var title string
if b.title == "" {
- st = st.Dim(true)
+ st = st.Dim(true).Foreground(bs.colors.ServerForeground)
title = b.netName
} else {
title = b.title