Merge pull request #308 from ollien/fix-row-count

Don't throw away nodes after drawing
This commit is contained in:
rivo 2019-06-26 15:39:40 +02:00 committed by GitHub
commit 2e907d29e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -562,13 +562,7 @@ func (t *TreeView) Draw(screen tcell.Screen) {
return
}
// Build the tree if necessary.
if t.nodes == nil {
t.process()
}
defer func() {
t.nodes = nil // Rebuild during next call to Draw()
}()
t.process()
// Scroll the tree.
x, y, width, height := t.GetInnerRect()