tiling: Fix reversed direction, when grouping with middle nodes

Fixes first case of #113
This commit is contained in:
Victoria Brekenfeld 2023-05-25 17:07:14 +02:00
parent 985a49483f
commit bf0eb97bea

View file

@ -722,7 +722,7 @@ impl TilingLayout {
} }
_ => None, _ => None,
} { } {
// if we can, we need to check the next element and move "into" it (down) // if we can, we need to check the next element and move "into" it
let next_child_id = tree let next_child_id = tree
.children_ids(&parent) .children_ids(&parent)
.unwrap() .unwrap()
@ -777,9 +777,9 @@ impl TilingLayout {
tree.make_nth_sibling( tree.make_nth_sibling(
&node_id, &node_id,
if direction == Direction::Left || direction == Direction::Up { if direction == Direction::Left || direction == Direction::Up {
0
} else {
1 1
} else {
0
}, },
) )
.unwrap(); .unwrap();