Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Set hide_floating_panes in parse_tab_node_with_template #3846

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions zellij-utils/src/kdl/kdl_layout_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,10 @@ impl<'a> KdlLayoutParser<'a> {
floating_pane.add_cwd_to_layout(&cwd_prefix);
}
}
// hide_floating_panes on the tab_layout takes precedence over the hide_floating_panes on the tab_template
tab_layout.hide_floating_panes =
kdl_get_bool_property_or_child_value!(kdl_node, "hide_floating_panes")
.unwrap_or(tab_layout.hide_floating_panes);
tab_layout.external_children_index = None;
Ok((
is_focused,
Expand Down Expand Up @@ -1654,6 +1658,8 @@ impl<'a> KdlLayoutParser<'a> {
let mut tab_floating_children = vec![];
let mut external_children_index = None;
let mut children_index_offset = 0;
let hide_floating_panes =
kdl_get_bool_property_or_child_value!(kdl_node, "hide_floating_panes").unwrap_or(false);
let is_part_of_stack = false;
if let Some(children) = kdl_children_nodes!(kdl_node) {
for (i, child) in children.iter().enumerate() {
Expand Down Expand Up @@ -1704,6 +1710,7 @@ impl<'a> KdlLayoutParser<'a> {
children_split_direction,
children: tab_children,
external_children_index,
hide_floating_panes,
..Default::default()
},
tab_floating_children,
Expand Down