aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-04-08 06:52:04 +0000
committerBlaž Hrastnik2021-04-08 06:52:04 +0000
commit8b33ba2284f88bea4c6144364d75189255466661 (patch)
treeae826a57cbbb2134b5375e2c976c59eebcef856d /helix-view
parent58c5fec592a825bed0b829cd0f46030c09cb0a11 (diff)
Correct the naming issue with vsplit and hsplit being swapped.
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/tree.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/helix-view/src/tree.rs b/helix-view/src/tree.rs
index 5fed2d5a..6204ba41 100644
--- a/helix-view/src/tree.rs
+++ b/helix-view/src/tree.rs
@@ -70,13 +70,13 @@ impl Container {
impl Default for Container {
fn default() -> Self {
- Self::new(Layout::Horizontal)
+ Self::new(Layout::Vertical)
}
}
impl Tree {
pub fn new(area: Rect) -> Self {
- let root = Node::container(Layout::Horizontal);
+ let root = Node::container(Layout::Vertical);
let mut nodes = HopSlotMap::with_key();
let root = nodes.insert(root);
@@ -322,7 +322,7 @@ impl Tree {
container.area = area;
match container.layout {
- Layout::Vertical => {
+ Layout::Horizontal => {
let len = container.children.len();
let height = area.height / len as u16;
@@ -347,7 +347,7 @@ impl Tree {
self.stack.push((*child, area));
}
}
- Layout::Horizontal => {
+ Layout::Vertical => {
let len = container.children.len();
let width = area.width / len as u16;