Skip to content

Commit

Permalink
Additional check for insertion
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineCharpentier-19 committed Sep 15, 2022
1 parent 46a40ba commit b0b5ca4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/view.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static inline enum window_node_split window_node_get_split(struct window_node *n

static inline float window_node_get_ratio(struct window_node *node)
{
return clampf_range(node->ratio, 0.1f, 0.9f);
return (node->ratio <= 0.0f) ? g_space_manager.split_ratio : clampf_range(node->ratio, 0.1f, 0.9f);
}

static inline float window_node_get_gap(struct view *view)
Expand Down

0 comments on commit b0b5ca4

Please sign in to comment.