commit 3bb7400

Hubert Hirtz  ·  2020-08-05 16:02:50 +0000 UTC
parent 0b3c0c4
Show line on the left of typing indicators
1 files changed,  +11, -5
+11, -5
 1@@ -476,8 +476,18 @@ func (bs *bufferList) drawStatusBar(screen tcell.Screen, y int) {
 2 	st := tcell.StyleDefault.Dim(true)
 3 	nicks := bs.list[bs.current].typings
 4 	verb := " is typing..."
 5-	x := 0
 6 
 7+	for x := 0; x < bs.width; x++ {
 8+		screen.SetContent(x, y, 0x2500, nil, st)
 9+	}
10+
11+	if len(nicks) == 0 {
12+		return
13+	}
14+
15+	screen.SetContent(1, y, 0x2524, nil, st)
16+
17+	x := 2
18 	if 1 < len(nicks) {
19 		verb = " are typing..."
20 		for _, nick := range nicks[:len(nicks)-2] {
21@@ -496,10 +506,6 @@ func (bs *bufferList) drawStatusBar(screen tcell.Screen, y int) {
22 		screen.SetContent(x, y, 0x251c, nil, st)
23 		x++
24 	}
25-	for x < bs.width {
26-		screen.SetContent(x, y, 0x2500, nil, st)
27-		x++
28-	}
29 }
30 
31 func (bs *bufferList) drawTitleList(screen tcell.Screen, y int) {