diff options
Diffstat (limited to 'helix-view/src/tree.rs')
-rw-r--r-- | helix-view/src/tree.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-view/src/tree.rs b/helix-view/src/tree.rs index 5b56156f..b5eb5d87 100644 --- a/helix-view/src/tree.rs +++ b/helix-view/src/tree.rs @@ -4,6 +4,7 @@ use tui::layout::Rect; // the dimensions are recomputed on windo resize/tree change. // +#[cfg_attr(feature = "debug", derive(Debug))] pub struct Tree { root: ViewId, // (container, index inside the container) @@ -17,11 +18,13 @@ pub struct Tree { stack: Vec<(ViewId, Rect)>, } +#[cfg_attr(feature = "debug", derive(Debug))] pub struct Node { parent: ViewId, content: Content, } +#[cfg_attr(feature = "debug", derive(Debug))] pub enum Content { View(Box<View>), Container(Box<Container>), @@ -45,6 +48,7 @@ impl Node { // TODO: screen coord to container + container coordinate helpers +#[cfg_attr(feature = "debug", derive(Debug))] #[derive(PartialEq, Eq)] pub enum Layout { Horizontal, @@ -52,6 +56,7 @@ pub enum Layout { // could explore stacked/tabbed } +#[cfg_attr(feature = "debug", derive(Debug))] pub struct Container { layout: Layout, children: Vec<ViewId>, @@ -432,6 +437,7 @@ impl Tree { } } +#[cfg_attr(feature = "debug", derive(Debug))] pub struct Traverse<'a> { tree: &'a Tree, stack: Vec<ViewId>, // TODO: reuse the one we use on update |