summaryrefslogtreecommitdiffstats
path: root/src/display
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2021-02-05 08:06:42 +0100
committerCanop <cano.petrole@gmail.com>2021-02-05 08:09:42 +0100
commit8f66f4b376d31fcf792b7716fdca704deb23ef90 (patch)
tree22cdc75d9daf202a21dcee0a14e29cf7388e3851 /src/display
parentab89b0b2718c7d28f928c47d20feb38d764ccbb5 (diff)
limit tree height in :pt even when there's more root items
The old behavior might be useful but isn't clear enough. I'll restore it otherwise if needed. Fix #341
Diffstat (limited to 'src/display')
-rw-r--r--src/display/displayable_tree.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/display/displayable_tree.rs b/src/display/displayable_tree.rs
index 9882042..86361f8 100644
--- a/src/display/displayable_tree.rs
+++ b/src/display/displayable_tree.rs
@@ -49,6 +49,7 @@ impl<'s, 't> DisplayableTree<'s, 't> {
skin: &'s StyleMap,
ext_colors: &'s ExtColorMap,
width: u16,
+ height: u16,
) -> DisplayableTree<'s, 't> {
DisplayableTree {
tree,
@@ -58,7 +59,7 @@ impl<'s, 't> DisplayableTree<'s, 't> {
left: 0,
top: 0,
width,
- height: tree.lines.len() as u16,
+ height,
},
in_app: false,
}