aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/msglist.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-05-16 15:37:06 +0200
committerRobin Jarry <robin@jarry.cc>2023-05-16 15:38:36 +0200
commite8089e7d8f6065031814bf7d80be043536e09fe7 (patch)
tree6c4daf7e4a465af925e81862c41c99ab4026f2b8 /widgets/msglist.go
parent8dca1171c7c40228e3be4f2eedcb1fe85a680e7c (diff)
downloadaerc-e8089e7d8f6065031814bf7d80be043536e09fe7.tar.gz
dirtree: fixup to apply correct patchset version
I had applied v2 instead of v4... It is time to automate these things a bit better. Fixes: 6e038c7fd510 ("dirtree: modify drawing of the dirtree") Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/msglist.go')
-rw-r--r--widgets/msglist.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go
index d1bba32f..1fc33279 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -444,10 +444,15 @@ func threadPrefix(t *types.Thread, reverse bool, point bool) string {
}
var prefix []string
for n := t; n.Parent != nil; n = n.Parent {
- if n.Parent.NextSibling != nil {
+ switch {
+ case n.Parent.NextSibling != nil && point:
prefix = append(prefix, "│ ")
- } else {
+ case n.Parent.NextSibling != nil:
+ prefix = append(prefix, "│ ")
+ case point:
prefix = append(prefix, " ")
+ default:
+ prefix = append(prefix, " ")
}
}
// prefix is now in a reverse order (inside --> outside), so turn it