Fix erased vertical dividing line (#1810)

Fix the 1st part of #1773: the dividing line between vertical splits
is not displayed if the split on the left contains other splits, i.e.
is not a leaf node.
This commit is contained in:
Dmitry Maluka 2020-08-05 00:33:16 +02:00 committed by GitHub
parent 9a3fb52b42
commit a4cc5a4146
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,15 +38,14 @@ func (w *UIWindow) drawNode(n *views.Node) {
}
for i, c := range cs {
if c.IsLeaf() && c.Kind == views.STVert {
if c.Kind == views.STVert {
if i != len(cs)-1 {
for h := 0; h < c.H; h++ {
screen.SetContent(c.X+c.W, c.Y+h, divchar, combc, dividerStyle)
}
}
} else {
w.drawNode(c)
}
w.drawNode(c)
}
}