aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/tree.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/tree.rs')
-rw-r--r--helix-view/src/tree.rs42
1 files changed, 9 insertions, 33 deletions
diff --git a/helix-view/src/tree.rs b/helix-view/src/tree.rs
index 469e913d..5ec2773d 100644
--- a/helix-view/src/tree.rs
+++ b/helix-view/src/tree.rs
@@ -701,7 +701,7 @@ impl<'a> DoubleEndedIterator for Traverse<'a> {
#[cfg(test)]
mod test {
use super::*;
- use crate::editor::GutterType;
+ use crate::editor::GutterConfig;
use crate::DocumentId;
#[test]
@@ -712,34 +712,22 @@ mod test {
width: 180,
height: 80,
});
- let mut view = View::new(
- DocumentId::default(),
- vec![GutterType::Diagnostics, GutterType::LineNumbers],
- );
+ let mut view = View::new(DocumentId::default(), GutterConfig::default());
view.area = Rect::new(0, 0, 180, 80);
tree.insert(view);
let l0 = tree.focus;
- let view = View::new(
- DocumentId::default(),
- vec![GutterType::Diagnostics, GutterType::LineNumbers],
- );
+ let view = View::new(DocumentId::default(), GutterConfig::default());
tree.split(view, Layout::Vertical);
let r0 = tree.focus;
tree.focus = l0;
- let view = View::new(
- DocumentId::default(),
- vec![GutterType::Diagnostics, GutterType::LineNumbers],
- );
+ let view = View::new(DocumentId::default(), GutterConfig::default());
tree.split(view, Layout::Horizontal);
let l1 = tree.focus;
tree.focus = l0;
- let view = View::new(
- DocumentId::default(),
- vec![GutterType::Diagnostics, GutterType::LineNumbers],
- );
+ let view = View::new(DocumentId::default(), GutterConfig::default());
tree.split(view, Layout::Vertical);
let l2 = tree.focus;
@@ -781,40 +769,28 @@ mod test {
});
let doc_l0 = DocumentId::default();
- let mut view = View::new(
- doc_l0,
- vec![GutterType::Diagnostics, GutterType::LineNumbers],
- );
+ let mut view = View::new(doc_l0, GutterConfig::default());
view.area = Rect::new(0, 0, 180, 80);
tree.insert(view);
let l0 = tree.focus;
let doc_r0 = DocumentId::default();
- let view = View::new(
- doc_r0,
- vec![GutterType::Diagnostics, GutterType::LineNumbers],
- );
+ let view = View::new(doc_r0, GutterConfig::default());
tree.split(view, Layout::Vertical);
let r0 = tree.focus;
tree.focus = l0;
let doc_l1 = DocumentId::default();
- let view = View::new(
- doc_l1,
- vec![GutterType::Diagnostics, GutterType::LineNumbers],
- );
+ let view = View::new(doc_l1, GutterConfig::default());
tree.split(view, Layout::Horizontal);
let l1 = tree.focus;
tree.focus = l0;
let doc_l2 = DocumentId::default();
- let view = View::new(
- doc_l2,
- vec![GutterType::Diagnostics, GutterType::LineNumbers],
- );
+ let view = View::new(doc_l2, GutterConfig::default());
tree.split(view, Layout::Vertical);
let l2 = tree.focus;