diff --git a/cli/tree.c b/cli/tree.c index 63c8088..0c0b975 100644 --- a/cli/tree.c +++ b/cli/tree.c @@ -119,7 +119,7 @@ static int bifurcate_dims(const struct crs_node *parent, } else { _dims0->height *= ratio; _dims1->height -= _dims0->height; - _dims1->y += _dims1->height; + _dims1->y += _dims0->height; } if (!_dims0->width || !_dims0->height || !_dims1->width || !_dims1->height) { @@ -162,8 +162,7 @@ static void resize_node(struct crs_node *node, struct crs_nodedims *new_dims) { * axis - controls which direction the subdivision occurs * invert_axis - invert index of the original node in the new abstract node */ -void bifurcate_window_node(struct crs_node **node, - const enum crs_axis axis, +void bifurcate_window_node(struct crs_node **node, const enum crs_axis axis, const int invert_axis, const float ratio) { assert((*node)->type == NODE_WINDOW); struct crs_nodedims *dims0, *dims1;