From fce84f184418787365ff3e2ad8a2ac72a28b0a17 Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Thu, 11 Sep 2025 19:27:02 +1000 Subject: [PATCH] fix bifurcation AXIS_Y bug --- cli/tree.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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;