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