aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2026-01-20 17:11:26 +0100
committerGitHub <noreply@github.com>2026-01-20 17:11:26 +0100
commit432c6d749121bc2d8fa3361b59c5d14cbd82a0e0 (patch)
treeca8f61fa7ed151681d5f3220bdf91a100139306c
parentAllow toggling pane frames for specific panes (#4615) (diff)
downloadsl0ppij-432c6d749121bc2d8fa3361b59c5d14cbd82a0e0.tar.gz
sl0ppij-432c6d749121bc2d8fa3361b59c5d14cbd82a0e0.tar.xz
sl0ppij-432c6d749121bc2d8fa3361b59c5d14cbd82a0e0.zip
Fix tiled new pane borderless (#4618)
* allow opening tiled pane as borderless * rustfmt * add pr * fix e2e tests
-rw-r--r--CHANGELOG.md2
-rw-r--r--default-plugins/sequence/src/main.rs11
-rw-r--r--default-plugins/sequence/src/state/execution.rs1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_background_plugin_command.snap4
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_plugin_command.snap7
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_plugin_command.snap7
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_plugin_command.snap7
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_plugin_command.snap7
-rw-r--r--zellij-server/src/plugins/zellij_exports.rs12
-rw-r--r--zellij-server/src/route.rs40
-rw-r--r--zellij-server/src/screen.rs6
-rw-r--r--zellij-server/src/tab/mod.rs65
-rw-r--r--zellij-server/src/tab/unit/tab_integration_tests.rs23
-rw-r--r--zellij-server/src/tab/unit/tab_tests.rs593
-rw-r--r--zellij-server/src/unit/screen_tests.rs10
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap2
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap2
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap2
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_command_and_cwd.snap2
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap2
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap2
-rw-r--r--zellij-utils/assets/prost/api.action.rs18
-rw-r--r--zellij-utils/assets/prost_ipc/client_server_contract.rs35
-rw-r--r--zellij-utils/src/client_server_contract/common_types.proto20
-rw-r--r--zellij-utils/src/data.rs37
-rw-r--r--zellij-utils/src/input/actions.rs14
-rw-r--r--zellij-utils/src/ipc/protobuf_conversion.rs86
-rw-r--r--zellij-utils/src/ipc/tests/roundtrip_tests.rs2
-rw-r--r--zellij-utils/src/kdl/mod.rs2
-rw-r--r--zellij-utils/src/plugin_api/action.proto10
-rw-r--r--zellij-utils/src/plugin_api/action.rs43
31 files changed, 734 insertions, 340 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ca020c6d..e4906973 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,7 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* fix: properly close the welcome screen session when switching sessions away from it (https://github.com/zellij-org/zellij/pull/4605)
* fix: properly center floating panes started with `--floating` when explicit width/height is provided (https://github.com/zellij-org/zellij/pull/4607)
* fix: allow specifying "0%" coordinates when opening panes wit "zellij run --floating" (https://github.com/zellij-org/zellij/pull/4609)
-* feat: allow opening panes as `borderless` or toggling/changing the borderless status of existing panes (https://github.com/zellij-org/zellij/pull/4615)
+* feat: allow opening panes as `borderless` or toggling/changing the borderless status of existing panes (https://github.com/zellij-org/zellij/pull/4615 and https://github.com/zellij-org/zellij/pull/4618)
## [0.43.1] - 2025-08-08
diff --git a/default-plugins/sequence/src/main.rs b/default-plugins/sequence/src/main.rs
index 4631caa2..0bfbfddc 100644
--- a/default-plugins/sequence/src/main.rs
+++ b/default-plugins/sequence/src/main.rs
@@ -599,7 +599,10 @@ pub fn handle_action_complete(
};
// Determine placement based on layout mode
- let placement = NewPanePlacement::Stacked(pane_id);
+ let placement = NewPanePlacement::Stacked {
+ pane_id_to_stack_under: pane_id,
+ borderless: Some(false),
+ };
// Update status: mark current command as completed
// Use the pane_id from ActionComplete if the status is still Pending
@@ -1016,6 +1019,7 @@ fn rerun_sequence(state: &mut State) {
NewPanePlacement::InPlace {
pane_id_to_replace: Some(*pane_id),
close_replaced_pane,
+ borderless: Some(false),
}
} else {
let pane_id_to_stack_under = state
@@ -1023,7 +1027,10 @@ fn rerun_sequence(state: &mut State) {
.all_commands
.iter()
.find_map(|c| c.get_pane_id());
- NewPanePlacement::Stacked(pane_id_to_stack_under)
+ NewPanePlacement::Stacked {
+ pane_id_to_stack_under,
+ borderless: Some(false),
+ }
};
// Determine unblock_condition based on whether this is the last command
diff --git a/default-plugins/sequence/src/state/execution.rs b/default-plugins/sequence/src/state/execution.rs
index ff630ec0..fb194f61 100644
--- a/default-plugins/sequence/src/state/execution.rs
+++ b/default-plugins/sequence/src/state/execution.rs
@@ -239,6 +239,7 @@ impl Execution {
let placement = NewPanePlacement::InPlace {
pane_id_to_replace: primary_pane_id,
close_replaced_pane: false,
+ borderless: Some(false),
};
let action = Action::NewBlockingPane {
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_background_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_background_plugin_command.snap
index 37624741..7c6f1dc1 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_background_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_background_plugin_command.snap
@@ -29,7 +29,9 @@ Some(
),
),
None,
- NoPreference,
+ NoPreference {
+ borderless: None,
+ },
true,
ClientId(
1,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_plugin_command.snap
index 596700c5..371851ab 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_plugin_command.snap
@@ -27,9 +27,10 @@ Some(
),
),
None,
- Tiled(
- None,
- ),
+ Tiled {
+ direction: None,
+ borderless: None,
+ },
false,
ClientId(
1,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_plugin_command.snap
index b899e596..f16526d0 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_plugin_command.snap
@@ -25,9 +25,10 @@ Some(
Some(
"Editing: /path/to/my/file.rs",
),
- Tiled(
- None,
- ),
+ Tiled {
+ direction: None,
+ borderless: None,
+ },
false,
ClientId(
1,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_plugin_command.snap
index 4d2689db..59970eee 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_plugin_command.snap
@@ -27,9 +27,10 @@ Some(
Some(
"Editing: /path/to/my/file.rs",
),
- Tiled(
- None,
- ),
+ Tiled {
+ direction: None,
+ borderless: None,
+ },
false,
ClientId(
1,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_plugin_command.snap
index dd197b76..582c0aaf 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_plugin_command.snap
@@ -20,9 +20,10 @@ Some(
),
),
None,
- Tiled(
- None,
- ),
+ Tiled {
+ direction: None,
+ borderless: None,
+ },
false,
ClientId(
1,
diff --git a/zellij-server/src/plugins/zellij_exports.rs b/zellij-server/src/plugins/zellij_exports.rs
index 2ba461b3..9c8fd616 100644
--- a/zellij-server/src/plugins/zellij_exports.rs
+++ b/zellij-server/src/plugins/zellij_exports.rs
@@ -1236,6 +1236,7 @@ fn open_terminal(env: &PluginEnv, cwd: PathBuf) {
command: run_command_action,
pane_name: None,
near_current_pane: false,
+ borderless: None,
};
apply_action!(action, error_msg, env);
}
@@ -1254,7 +1255,10 @@ fn open_terminal_near_plugin(env: &PluginEnv, cwd: PathBuf) {
let _ = env.senders.send_to_pty(PtyInstruction::SpawnTerminal(
Some(default_shell),
name,
- NewPanePlacement::Tiled(None),
+ NewPanePlacement::Tiled {
+ direction: None,
+ borderless: None,
+ },
false,
ClientTabIndexOrPaneId::PaneId(PaneId::Plugin(env.plugin_id)),
None, // no completion signal needed for plugin calls
@@ -1440,6 +1444,7 @@ fn open_command_pane(
command: Some(run_command_action),
pane_name: name,
near_current_pane: false,
+ borderless: None,
};
apply_action!(action, error_msg, env);
}
@@ -1475,7 +1480,10 @@ fn open_command_pane_near_plugin(
let _ = env.senders.send_to_pty(PtyInstruction::SpawnTerminal(
Some(run_cmd),
name,
- NewPanePlacement::Tiled(None),
+ NewPanePlacement::Tiled {
+ direction: None,
+ borderless: None,
+ },
false,
ClientTabIndexOrPaneId::PaneId(PaneId::Plugin(env.plugin_id)),
None, // no completion signal needed for plugin calls
diff --git a/zellij-server/src/route.rs b/zellij-server/src/route.rs
index 99fee4f1..f643f024 100644
--- a/zellij-server/src/route.rs
+++ b/zellij-server/src/route.rs
@@ -501,8 +501,11 @@ pub(crate) fn route_action(
} => {
let shell = default_shell.clone();
let new_pane_placement = match direction {
- Some(direction) => NewPanePlacement::Tiled(Some(direction)),
- None => NewPanePlacement::NoPreference,
+ Some(direction) => NewPanePlacement::Tiled {
+ direction: Some(direction),
+ borderless: None,
+ },
+ None => NewPanePlacement::NoPreference { borderless: None },
};
senders
.send_to_pty(PtyInstruction::SpawnTerminal(
@@ -543,9 +546,10 @@ pub(crate) fn route_action(
// behavior, they should not provide pane
// inside the placement, but rather have the current pane id be picked up instead)
let pane_id = match placement {
- NewPanePlacement::Stacked(pane_id_to_stack_under) => {
- pane_id_to_stack_under.map(|p| p.into()).or(pane_id)
- },
+ NewPanePlacement::Stacked {
+ pane_id_to_stack_under,
+ ..
+ } => pane_id_to_stack_under.map(|p| p.into()).or(pane_id),
NewPanePlacement::InPlace {
pane_id_to_replace, ..
} => pane_id_to_replace.map(|p| p.into()).or(pane_id),
@@ -605,7 +609,10 @@ pub(crate) fn route_action(
if should_float {
NewPanePlacement::Floating(floating_pane_coordinates)
} else {
- NewPanePlacement::Tiled(split_direction)
+ NewPanePlacement::Tiled {
+ direction: split_direction,
+ borderless: None,
+ }
},
start_suppressed,
ClientTabIndexOrPaneId::ClientId(client_id),
@@ -728,7 +735,10 @@ pub(crate) fn route_action(
.send_to_pty(PtyInstruction::SpawnTerminal(
run_cmd,
name,
- NewPanePlacement::Stacked(Some(pane_id.into())),
+ NewPanePlacement::Stacked {
+ pane_id_to_stack_under: Some(pane_id.into()),
+ borderless: None,
+ },
false,
ClientTabIndexOrPaneId::PaneId(pane_id),
Some(NotificationEnd::new(completion_tx)),
@@ -741,7 +751,10 @@ pub(crate) fn route_action(
.send_to_pty(PtyInstruction::SpawnTerminal(
run_cmd,
name,
- NewPanePlacement::Stacked(None),
+ NewPanePlacement::Stacked {
+ pane_id_to_stack_under: None,
+ borderless: None,
+ },
false,
ClientTabIndexOrPaneId::ClientId(client_id),
Some(NotificationEnd::new(completion_tx)),
@@ -756,6 +769,7 @@ pub(crate) fn route_action(
command: run_command,
pane_name: name,
near_current_pane,
+ borderless,
} => {
let run_cmd = run_command
.map(|cmd| TerminalAction::RunCommand(cmd.into()))
@@ -769,7 +783,10 @@ pub(crate) fn route_action(
.send_to_pty(PtyInstruction::SpawnTerminal(
run_cmd,
name,
- NewPanePlacement::Tiled(direction),
+ NewPanePlacement::Tiled {
+ direction,
+ borderless,
+ },
false,
client_tab_index_or_paneid,
Some(NotificationEnd::new(completion_tx)),
@@ -825,7 +842,10 @@ pub(crate) fn route_action(
.send_to_pty(PtyInstruction::SpawnTerminal(
run_cmd,
None,
- NewPanePlacement::Tiled(command.direction),
+ NewPanePlacement::Tiled {
+ direction: command.direction,
+ borderless: None,
+ },
false,
client_tab_index_or_paneid,
Some(NotificationEnd::new(completion_tx)),
diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs
index 2eb2c416..1d0713e8 100644
--- a/zellij-server/src/screen.rs
+++ b/zellij-server/src/screen.rs
@@ -2943,6 +2943,7 @@ impl Screen {
close_replaced_pane,
run,
None,
+ None,
);
if let Some(pane_title) = pane_title {
let _ = tab.rename_pane(pane_title.as_bytes().to_vec(), new_pane_id);
@@ -5637,7 +5638,10 @@ pub(crate) fn screen_thread_main(
);
}
if should_be_tiled {
- new_pane_placement = NewPanePlacement::Tiled(None);
+ new_pane_placement = NewPanePlacement::Tiled {
+ direction: None,
+ borderless: None,
+ };
}
if should_be_in_place {
new_pane_placement = NewPanePlacement::with_pane_id_to_replace(
diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs
index e1ec2aa1..98743bf8 100644
--- a/zellij-server/src/tab/mod.rs
+++ b/zellij-server/src/tab/mod.rs
@@ -1392,7 +1392,7 @@ impl Tab {
) -> Result<()> {
let invoked_with = self.normalize_invoked_with_for_default_shell(invoked_with);
match new_pane_placement {
- NewPanePlacement::NoPreference => self.new_no_preference_pane(
+ NewPanePlacement::NoPreference { borderless } => self.new_no_preference_pane(
pid,
initial_pane_title,
invoked_with,
@@ -1400,8 +1400,12 @@ impl Tab {
should_focus_pane,
client_id,
blocking_notification,
+ borderless,
),
- NewPanePlacement::Tiled(None) => self.new_tiled_pane(
+ NewPanePlacement::Tiled {
+ direction: None,
+ borderless,
+ } => self.new_tiled_pane(
pid,
initial_pane_title,
invoked_with,
@@ -1409,8 +1413,12 @@ impl Tab {
should_focus_pane,
client_id,
blocking_notification,
+ borderless,
),
- NewPanePlacement::Tiled(Some(direction)) => {
+ NewPanePlacement::Tiled {
+ direction: Some(direction),
+ borderless,
+ } => {
if let Some(client_id) = client_id {
if direction == Direction::Left || direction == Direction::Right {
self.vertical_split(
@@ -1418,6 +1426,7 @@ impl Tab {
initial_pane_title,
client_id,
blocking_notification,
+ borderless,
)?;
} else {
self.horizontal_split(
@@ -1425,6 +1434,7 @@ impl Tab {
initial_pane_title,
client_id,
blocking_notification,
+ borderless,
)?;
}
}
@@ -1442,6 +1452,7 @@ impl Tab {
NewPanePlacement::InPlace {
pane_id_to_replace,
close_replaced_pane,
+ borderless,
} => self.new_in_place_pane(
pid,
initial_pane_title,
@@ -1450,8 +1461,12 @@ impl Tab {
close_replaced_pane,
client_id,
blocking_notification,
+ borderless,
),
- NewPanePlacement::Stacked(pane_id_to_stack_under) => self.new_stacked_pane(
+ NewPanePlacement::Stacked {
+ pane_id_to_stack_under,
+ borderless,
+ } => self.new_stacked_pane(
pid,
initial_pane_title,
invoked_with,
@@ -1460,6 +1475,7 @@ impl Tab {
pane_id_to_stack_under.map(|id| id.into()),
client_id,
blocking_notification,
+ borderless,
),
}
}
@@ -1472,6 +1488,7 @@ impl Tab {
should_focus_pane: bool,
client_id: Option<ClientId>,
blocking_notification: Option<NotificationEnd>,
+ borderless: Option<bool>,
) -> Result<()> {
let err_context = || format!("failed to create new pane with id {pid:?}");
self.close_down_to_max_terminals()
@@ -1529,6 +1546,10 @@ impl Tab {
},
};
+ if let Some(borderless) = borderless {
+ new_pane.set_borderless(borderless);
+ }
+
if start_suppressed {
// this pane needs to start in the background (suppressed), only accessible if a plugin takes it out
// of there in one way or another
@@ -1576,6 +1597,7 @@ impl Tab {
should_focus_pane: bool,
client_id: Option<ClientId>,
blocking_notification: Option<NotificationEnd>,
+ borderless: Option<bool>,
) -> Result<()> {
let err_context = || format!("failed to create new pane with id {pid:?}");
if should_focus_pane {
@@ -1636,6 +1658,10 @@ impl Tab {
},
};
+ if let Some(borderless) = borderless {
+ new_pane.set_borderless(borderless);
+ }
+
if start_suppressed {
// this pane needs to start in the background (suppressed), only accessible if a plugin takes it out
// of there in one way or another
@@ -1770,6 +1796,7 @@ impl Tab {
close_replaced_pane: bool,
client_id: Option<ClientId>,
blocking_notification: Option<NotificationEnd>,
+ borderless: Option<bool>,
) -> Result<()> {
match (pane_id_to_replace, client_id) {
(Some(pane_id_to_replace), _) => {
@@ -1779,6 +1806,7 @@ impl Tab {
close_replaced_pane,
invoked_with,
blocking_notification,
+ borderless,
)?;
},
(None, Some(client_id)) => match self.get_active_pane_id(client_id) {
@@ -1789,6 +1817,7 @@ impl Tab {
close_replaced_pane,
invoked_with,
blocking_notification,
+ borderless,
)?;
},
None => {
@@ -1814,6 +1843,7 @@ impl Tab {
pane_id_to_stack_under: Option<PaneId>,
client_id: Option<ClientId>,
blocking_notification: Option<NotificationEnd>,
+ borderless: Option<bool>,
) -> Result<()> {
let err_context = || format!("failed to create new pane with id {pid:?}");
if should_focus_pane {
@@ -1874,6 +1904,10 @@ impl Tab {
},
};
+ if let Some(borderless) = borderless {
+ new_pane.set_borderless(borderless);
+ }
+
if start_suppressed {
// this pane needs to start in the background (suppressed), only accessible if a plugin takes it out
// of there in one way or another
@@ -2024,6 +2058,7 @@ impl Tab {
close_replaced_pane: bool,
run: Option<Run>,
completion_tx: Option<NotificationEnd>,
+ borderless: Option<bool>,
) -> Result<()> {
// this method creates a new pane from pid and replaces it with the active pane
// the active pane is then suppressed (hidden and not rendered) until the current
@@ -2033,7 +2068,7 @@ impl Tab {
match new_pane_id {
PaneId::Terminal(new_pane_id) => {
let next_terminal_position = self.get_next_terminal_position(); // TODO: this is not accurate in this case
- let new_pane = TerminalPane::new(
+ let mut new_pane = TerminalPane::new(
new_pane_id,
PaneGeom::default(), // the initial size will be set later
self.style,
@@ -2052,6 +2087,9 @@ impl Tab {
self.explicitly_disable_kitty_keyboard_protocol,
completion_tx,
);
+ if let Some(borderless) = borderless {
+ new_pane.set_borderless(borderless);
+ }
let replaced_pane = if self.floating_panes.panes_contain(&old_pane_id) {
self.floating_panes
.replace_pane(old_pane_id, Box::new(new_pane))
@@ -2093,7 +2131,7 @@ impl Tab {
}
},
PaneId::Plugin(plugin_pid) => {
- let new_pane = PluginPane::new(
+ let mut new_pane = PluginPane::new(
plugin_pid,
PaneGeom::default(), // this will be filled out later
self.senders
@@ -2119,6 +2157,9 @@ impl Tab {
self.arrow_fonts,
self.styled_underlines,
);
+ if let Some(borderless) = borderless {
+ new_pane.set_borderless(borderless);
+ }
let replaced_pane = if self.floating_panes.panes_contain(&old_pane_id) {
self.floating_panes
.replace_pane(old_pane_id, Box::new(new_pane))
@@ -2210,6 +2251,7 @@ impl Tab {
initial_pane_title: Option<String>,
client_id: ClientId,
completion_tx: Option<NotificationEnd>,
+ borderless: Option<bool>,
) -> Result<()> {
let err_context =
|| format!("failed to split pane {pid:?} horizontally for client {client_id}");
@@ -2224,7 +2266,7 @@ impl Tab {
if self.tiled_panes.can_split_pane_horizontally(client_id) {
if let PaneId::Terminal(term_pid) = pid {
let next_terminal_position = self.get_next_terminal_position();
- let new_terminal = TerminalPane::new(
+ let mut new_terminal = TerminalPane::new(
term_pid,
PaneGeom::default(), // the initial size will be set later
self.style,
@@ -2243,6 +2285,9 @@ impl Tab {
self.explicitly_disable_kitty_keyboard_protocol,
completion_tx,
);
+ if let Some(borderless) = borderless {
+ new_terminal.set_borderless(borderless);
+ }
self.tiled_panes
.split_pane_horizontally(pid, Box::new(new_terminal), client_id);
self.set_should_clear_display_before_rendering();
@@ -2272,6 +2317,7 @@ impl Tab {
initial_pane_title: Option<String>,
client_id: ClientId,
completion_tx: Option<NotificationEnd>,
+ borderless: Option<bool>,
) -> Result<()> {
let err_context =
|| format!("failed to split pane {pid:?} vertically for client {client_id}");
@@ -2286,7 +2332,7 @@ impl Tab {
if self.tiled_panes.can_split_pane_vertically(client_id) {
if let PaneId::Terminal(term_pid) = pid {
let next_terminal_position = self.get_next_terminal_position();
- let new_terminal = TerminalPane::new(
+ let mut new_terminal = TerminalPane::new(
term_pid,
PaneGeom::default(), // the initial size will be set later
self.style,
@@ -2305,6 +2351,9 @@ impl Tab {
self.explicitly_disable_kitty_keyboard_protocol,
completion_tx,
);
+ if let Some(borderless) = borderless {
+ new_terminal.set_borderless(borderless);
+ }
self.tiled_panes
.split_pane_vertically(pid, Box::new(new_terminal), client_id);
self.set_should_clear_display_before_rendering();
diff --git a/zellij-server/src/tab/unit/tab_integration_tests.rs b/zellij-server/src/tab/unit/tab_integration_tests.rs
index eb160f7c..54b80f71 100644
--- a/zellij-server/src/tab/unit/tab_integration_tests.rs
+++ b/zellij-server/src/tab/unit/tab_integration_tests.rs
@@ -1034,10 +1034,10 @@ fn increase_tiled_pane_sizes_with_stacked_resizes_into_uneven_panes() {
.unwrap();
}
tab.move_focus_up(client_id).unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, client_id, None)
+ tab.vertical_split(PaneId::Terminal(4), None, client_id, None, None)
.unwrap();
tab.move_focus_right(client_id).unwrap();
- tab.horizontal_split(PaneId::Terminal(5), None, client_id, None)
+ tab.horizontal_split(PaneId::Terminal(5), None, client_id, None, None)
.unwrap();
tab.move_focus_down(client_id).unwrap();
@@ -1099,7 +1099,7 @@ fn split_stack_vertically() {
.unwrap();
tab.resize(client_id, ResizeStrategy::new(Resize::Increase, None))
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, client_id, None)
+ tab.vertical_split(PaneId::Terminal(4), None, client_id, None, None)
.unwrap();
tab.render(&mut output, None).unwrap();
@@ -1140,7 +1140,7 @@ fn split_stack_horizontally() {
.unwrap();
tab.resize(client_id, ResizeStrategy::new(Resize::Increase, None))
.unwrap();
- tab.horizontal_split(PaneId::Terminal(4), None, client_id, None)
+ tab.horizontal_split(PaneId::Terminal(4), None, client_id, None, None)
.unwrap();
tab.render(&mut output, None).unwrap();
@@ -1183,7 +1183,7 @@ fn render_stacks_without_pane_frames() {
.unwrap();
tab.resize(client_id, ResizeStrategy::new(Resize::Increase, None))
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, client_id, None)
+ tab.vertical_split(PaneId::Terminal(4), None, client_id, None, None)
.unwrap();
for i in 5..7 {
let new_pane_id_1 = PaneId::Terminal(i);
@@ -1376,7 +1376,10 @@ fn new_stacked_pane() {
None,
false,
true,
- NewPanePlacement::Stacked(None),
+ NewPanePlacement::Stacked {
+ pane_id_to_stack_under: None,
+ borderless: None,
+ },
Some(client_id),
None,
)
@@ -5450,7 +5453,7 @@ fn move_focus_right_into_stacked_panes() {
.unwrap();
}
tab.move_focus_left(client_id);
- tab.horizontal_split(PaneId::Terminal(16), None, client_id, None)
+ tab.horizontal_split(PaneId::Terminal(16), None, client_id, None, None)
.unwrap();
tab.move_focus_up(client_id);
@@ -5522,7 +5525,7 @@ fn move_focus_left_into_stacked_panes() {
.unwrap();
}
tab.move_focus_right(client_id);
- tab.horizontal_split(PaneId::Terminal(1), None, client_id, None)
+ tab.horizontal_split(PaneId::Terminal(1), None, client_id, None, None)
.unwrap();
tab.move_focus_up(client_id);
@@ -5599,7 +5602,7 @@ fn move_focus_up_into_stacked_panes() {
tab.move_focus_up(client_id);
tab.move_focus_left(client_id);
tab.move_focus_down(client_id);
- tab.vertical_split(PaneId::Terminal(7), None, client_id, None)
+ tab.vertical_split(PaneId::Terminal(7), None, client_id, None, None)
.unwrap();
tab.move_focus_up(client_id);
@@ -5672,7 +5675,7 @@ fn move_focus_down_into_stacked_panes() {
}
tab.move_focus_left(client_id);
tab.move_focus_up(client_id);
- tab.vertical_split(PaneId::Terminal(7), None, client_id, None)
+ tab.vertical_split(PaneId::Terminal(7), None, client_id, None, None)
.unwrap();
tab.move_focus_down(client_id);
diff --git a/zellij-server/src/tab/unit/tab_tests.rs b/zellij-server/src/tab/unit/tab_tests.rs
index 085f8211..3adbf43b 100644
--- a/zellij-server/src/tab/unit/tab_tests.rs
+++ b/zellij-server/src/tab/unit/tab_tests.rs
@@ -405,7 +405,7 @@ fn write_to_suppressed_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
// Suppress pane 2 and remove it from active panes
@@ -436,7 +436,8 @@ fn split_panes_vertically() {
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.vertical_split(new_pane_id, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id, None, 1, None, None)
+ .unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 2, "The tab has two panes");
assert_eq!(
tab.tiled_panes
@@ -533,7 +534,8 @@ fn split_panes_horizontally() {
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.horizontal_split(new_pane_id, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id, None, 1, None, None)
+ .unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 2, "The tab has two panes");
assert_eq!(
@@ -825,7 +827,7 @@ pub fn cannot_split_panes_vertically_when_active_pane_is_too_small() {
let size = Size { cols: 8, rows: 20 };
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
assert_eq!(
tab.tiled_panes.panes.len(),
@@ -839,7 +841,7 @@ pub fn cannot_split_panes_horizontally_when_active_pane_is_too_small() {
let size = Size { cols: 121, rows: 4 };
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
assert_eq!(
tab.tiled_panes.panes.len(),
@@ -880,7 +882,7 @@ pub fn cannot_split_panes_vertically_when_active_pane_has_fixed_columns() {
fixed_child.split_size = Some(SplitSize::Fixed(30));
initial_layout.children = vec![fixed_child, TiledPaneLayout::default()];
let mut tab = create_new_tab_with_layout(size, initial_layout);
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 2, "Tab still has two panes");
}
@@ -894,7 +896,7 @@ pub fn cannot_split_panes_horizontally_when_active_pane_has_fixed_rows() {
fixed_child.split_size = Some(SplitSize::Fixed(12));
initial_layout.children = vec![fixed_child, TiledPaneLayout::default()];
let mut tab = create_new_tab_with_layout(size, initial_layout);
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 2, "Tab still has two panes");
}
@@ -1238,7 +1240,8 @@ pub fn close_pane_with_another_pane_above_it() {
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.horizontal_split(new_pane_id, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.close_focused_pane(1, None).unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 1, "One pane left in tab");
@@ -1304,7 +1307,8 @@ pub fn close_pane_with_another_pane_below_it() {
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.horizontal_split(new_pane_id, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab.close_focused_pane(1, None).unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 1, "One pane left in tab");
@@ -1368,7 +1372,8 @@ pub fn close_pane_with_another_pane_to_the_left() {
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.vertical_split(new_pane_id, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.close_focused_pane(1, None).unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 1, "One pane left in tab");
@@ -1431,7 +1436,8 @@ pub fn close_pane_with_another_pane_to_the_right() {
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.vertical_split(new_pane_id, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
tab.close_focused_pane(1, None).unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 1, "One pane left in tab");
@@ -1498,9 +1504,11 @@ pub fn close_pane_with_multiple_panes_above_it() {
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id_1 = PaneId::Terminal(2);
let new_pane_id_2 = PaneId::Terminal(3);
- tab.horizontal_split(new_pane_id_1, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(new_pane_id_2, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
tab.move_focus_down(1).unwrap();
tab.close_focused_pane(1, None).unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 2, "Two panes left in tab");
@@ -1610,8 +1618,10 @@ pub fn close_pane_with_multiple_panes_below_it() {
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id_1 = PaneId::Terminal(2);
let new_pane_id_2 = PaneId::Terminal(3);
- tab.horizontal_split(new_pane_id_1, None, 1, None).unwrap();
- tab.vertical_split(new_pane_id_2, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
+ tab.vertical_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab.close_focused_pane(1, None).unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 2, "Two panes left in tab");
@@ -1721,9 +1731,11 @@ pub fn close_pane_with_multiple_panes_to_the_left() {
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id_1 = PaneId::Terminal(2);
let new_pane_id_2 = PaneId::Terminal(3);
- tab.vertical_split(new_pane_id_1, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(new_pane_id_2, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
tab.move_focus_right(1).unwrap();
tab.close_focused_pane(1, None).unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 2, "Two panes left in tab");
@@ -1833,8 +1845,10 @@ pub fn close_pane_with_multiple_panes_to_the_right() {
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id_1 = PaneId::Terminal(2);
let new_pane_id_2 = PaneId::Terminal(3);
- tab.vertical_split(new_pane_id_1, None, 1, None).unwrap();
- tab.horizontal_split(new_pane_id_2, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
+ tab.horizontal_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
tab.close_focused_pane(1, None).unwrap();
assert_eq!(tab.tiled_panes.panes.len(), 2, "Two panes left in tab");
@@ -1949,19 +1963,25 @@ pub fn close_pane_with_multiple_panes_above_it_away_from_screen_edges() {
let new_pane_id_5 = PaneId::Terminal(6);
let new_pane_id_6 = PaneId::Terminal(7);
- tab.vertical_split(new_pane_id_1, None, 1, None).unwrap();
- tab.vertical_split(new_pane_id_2, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
+ tab.vertical_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(new_pane_id_3, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_3, None, 1, None, None)
+ .unwrap();
tab.move_focus_right(1).unwrap();
- tab.horizontal_split(new_pane_id_4, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_4, None, 1, None, None)
+ .unwrap();
tab.move_focus_right(1).unwrap();
- tab.horizontal_split(new_pane_id_5, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_5, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_down(&mut tab, 1);
- tab.vertical_split(new_pane_id_6, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_6, None, 1, None, None)
+ .unwrap();
tab.move_focus_down(1).unwrap();
tab.close_focused_pane(1, None).unwrap();
@@ -2250,18 +2270,24 @@ pub fn close_pane_with_multiple_panes_below_it_away_from_screen_edges() {
let new_pane_id_5 = PaneId::Terminal(6);
let new_pane_id_6 = PaneId::Terminal(7);
- tab.vertical_split(new_pane_id_1, None, 1, None).unwrap();
- tab.vertical_split(new_pane_id_2, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
+ tab.vertical_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(new_pane_id_3, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_3, None, 1, None, None)
+ .unwrap();
tab.move_focus_right(1).unwrap();
- tab.horizontal_split(new_pane_id_4, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_4, None, 1, None, None)
+ .unwrap();
tab.move_focus_right(1).unwrap();
- tab.horizontal_split(new_pane_id_5, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_5, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_up(&mut tab, 1);
- tab.vertical_split(new_pane_id_6, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_6, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab.close_focused_pane(1, None).unwrap();
@@ -2552,21 +2578,27 @@ pub fn close_pane_with_multiple_panes_to_the_left_away_from_screen_edges() {
let new_pane_id_5 = PaneId::Terminal(6);
let new_pane_id_6 = PaneId::Terminal(7);
- tab.horizontal_split(new_pane_id_1, None, 1, None).unwrap();
- tab.horizontal_split(new_pane_id_2, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
+ tab.horizontal_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(new_pane_id_3, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_3, None, 1, None, None)
+ .unwrap();
tab.move_focus_down(1).unwrap();
- tab.vertical_split(new_pane_id_4, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_4, None, 1, None, None)
+ .unwrap();
tab.move_focus_down(1).unwrap();
- tab.vertical_split(new_pane_id_5, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_5, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_right(&mut tab, 1);
tab_resize_up(&mut tab, 1);
tab_resize_up(&mut tab, 1);
- tab.horizontal_split(new_pane_id_6, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_6, None, 1, None, None)
+ .unwrap();
tab.move_focus_right(1).unwrap();
tab.close_focused_pane(1, None).unwrap();
@@ -2857,20 +2889,26 @@ pub fn close_pane_with_multiple_panes_to_the_right_away_from_screen_edges() {
let new_pane_id_5 = PaneId::Terminal(6);
let new_pane_id_6 = PaneId::Terminal(7);
- tab.horizontal_split(new_pane_id_1, None, 1, None).unwrap();
- tab.horizontal_split(new_pane_id_2, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
+ tab.horizontal_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(new_pane_id_3, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_3, None, 1, None, None)
+ .unwrap();
tab.move_focus_down(1).unwrap();
- tab.vertical_split(new_pane_id_4, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_4, None, 1, None, None)
+ .unwrap();
tab.move_focus_down(1).unwrap();
- tab.vertical_split(new_pane_id_5, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_5, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_left(&mut tab, 1);
tab_resize_up(&mut tab, 1);
tab_resize_up(&mut tab, 1);
- tab.horizontal_split(new_pane_id_6, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_6, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
tab.close_focused_pane(1, None).unwrap();
@@ -3145,7 +3183,8 @@ pub fn move_focus_down() {
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.horizontal_split(new_pane_id, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab.move_focus_down(1).unwrap();
@@ -3168,9 +3207,12 @@ pub fn move_focus_down_to_the_most_recently_used_pane() {
let new_pane_id_2 = PaneId::Terminal(3);
let new_pane_id_3 = PaneId::Terminal(4);
- tab.horizontal_split(new_pane_id_1, None, 1, None).unwrap();
- tab.vertical_split(new_pane_id_2, None, 1, None).unwrap();
- tab.vertical_split(new_pane_id_3, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
+ tab.vertical_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
+ tab.vertical_split(new_pane_id_3, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab.move_focus_down(1).unwrap();
@@ -3196,7 +3238,8 @@ pub fn move_focus_up() {
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.horizontal_split(new_pane_id, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
assert_eq!(
@@ -3218,10 +3261,13 @@ pub fn move_focus_up_to_the_most_recently_used_pane() {
let new_pane_id_2 = PaneId::Terminal(3);
let new_pane_id_3 = PaneId::Terminal(4);
- tab.horizontal_split(new_pane_id_1, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(new_pane_id_2, None, 1, None).unwrap();
- tab.vertical_split(new_pane_id_3, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
+ tab.vertical_split(new_pane_id_3, None, 1, None, None)
+ .unwrap();
tab.move_focus_down(1).unwrap();
tab.move_focus_up(1).unwrap();
@@ -3247,7 +3293,8 @@ pub fn move_focus_left() {
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.vertical_split(new_pane_id, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
assert_eq!(
@@ -3269,10 +3316,13 @@ pub fn move_focus_left_to_the_most_recently_used_pane() {
let new_pane_id_2 = PaneId::Terminal(3);
let new_pane_id_3 = PaneId::Terminal(4);
- tab.vertical_split(new_pane_id_1, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(new_pane_id_2, None, 1, None).unwrap();
- tab.horizontal_split(new_pane_id_3, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
+ tab.horizontal_split(new_pane_id_3, None, 1, None, None)
+ .unwrap();
tab.move_focus_right(1).unwrap();
tab.move_focus_left(1).unwrap();
@@ -3298,7 +3348,8 @@ pub fn move_focus_right() {
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.vertical_split(new_pane_id, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
tab.move_focus_right(1).unwrap();
@@ -3321,9 +3372,12 @@ pub fn move_focus_right_to_the_most_recently_used_pane() {
let new_pane_id_2 = PaneId::Terminal(3);
let new_pane_id_3 = PaneId::Terminal(4);
- tab.vertical_split(new_pane_id_1, None, 1, None).unwrap();
- tab.horizontal_split(new_pane_id_2, None, 1, None).unwrap();
- tab.horizontal_split(new_pane_id_3, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
+ tab.horizontal_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
+ tab.horizontal_split(new_pane_id_3, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
tab.move_focus_right(1).unwrap();
@@ -3349,7 +3403,8 @@ pub fn move_active_pane_down() {
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.horizontal_split(new_pane_id, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab.move_active_pane_down(1);
@@ -3377,9 +3432,12 @@ pub fn move_active_pane_down_to_the_most_recently_used_position() {
let new_pane_id_2 = PaneId::Terminal(3);
let new_pane_id_3 = PaneId::Terminal(4);
- tab.horizontal_split(new_pane_id_1, None, 1, None).unwrap();
- tab.vertical_split(new_pane_id_2, None, 1, None).unwrap();
- tab.vertical_split(new_pane_id_3, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
+ tab.vertical_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
+ tab.vertical_split(new_pane_id_3, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab.move_active_pane_down(1);
@@ -3410,7 +3468,8 @@ pub fn move_active_pane_up() {
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.horizontal_split(new_pane_id, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.move_active_pane_up(1);
assert_eq!(
@@ -3437,10 +3496,13 @@ pub fn move_active_pane_up_to_the_most_recently_used_position() {
let new_pane_id_2 = PaneId::Terminal(3);
let new_pane_id_3 = PaneId::Terminal(4);
- tab.horizontal_split(new_pane_id_1, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(new_pane_id_2, None, 1, None).unwrap();
- tab.vertical_split(new_pane_id_3, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
+ tab.vertical_split(new_pane_id_3, None, 1, None, None)
+ .unwrap();
tab.move_focus_down(1).unwrap();
tab.move_active_pane_up(1);
@@ -3472,7 +3534,8 @@ pub fn move_active_pane_left() {
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.vertical_split(new_pane_id, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.move_active_pane_left(1);
assert_eq!(
@@ -3499,10 +3562,13 @@ pub fn move_active_pane_left_to_the_most_recently_used_position() {
let new_pane_id_2 = PaneId::Terminal(3);
let new_pane_id_3 = PaneId::Terminal(4);
- tab.vertical_split(new_pane_id_1, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(new_pane_id_2, None, 1, None).unwrap();
- tab.horizontal_split(new_pane_id_3, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
+ tab.horizontal_split(new_pane_id_3, None, 1, None, None)
+ .unwrap();
tab.move_focus_right(1).unwrap();
tab.move_active_pane_left(1);
@@ -3534,7 +3600,8 @@ pub fn move_active_pane_right() {
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.vertical_split(new_pane_id, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
tab.move_active_pane_right(1);
@@ -3562,9 +3629,12 @@ pub fn move_active_pane_right_to_the_most_recently_used_position() {
let new_pane_id_2 = PaneId::Terminal(3);
let new_pane_id_3 = PaneId::Terminal(4);
- tab.vertical_split(new_pane_id_1, None, 1, None).unwrap();
- tab.horizontal_split(new_pane_id_2, None, 1, None).unwrap();
- tab.horizontal_split(new_pane_id_3, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
+ tab.horizontal_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
+ tab.horizontal_split(new_pane_id_3, None, 1, None, None)
+ .unwrap();
tab.move_focus_left(1).unwrap();
tab.move_active_pane_right(1);
@@ -3603,7 +3673,8 @@ pub fn resize_down_with_pane_above() {
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.horizontal_split(new_pane_id, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab_resize_down(&mut tab, 1);
assert_eq!(
@@ -3710,7 +3781,8 @@ pub fn resize_down_with_pane_below() {
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id = PaneId::Terminal(2);
- tab.horizontal_split(new_pane_id, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_down(&mut tab, 1);
@@ -3824,8 +3896,10 @@ pub fn resize_down_with_panes_above_and_below() {
let first_pane_id = PaneId::Terminal(1);
let new_pane_id_1 = PaneId::Terminal(2);
let new_pane_id_2 = PaneId::Terminal(3);
- tab.horizontal_split(new_pane_id_1, None, 1, None).unwrap();
- tab.horizontal_split(new_pane_id_2, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
+ tab.horizontal_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_down(&mut tab, 1);
@@ -3978,9 +4052,11 @@ pub fn resize_down_with_multiple_panes_above() {
let first_pane_id = PaneId::Terminal(1);
let new_pane_id_1 = PaneId::Terminal(2);
let new_pane_id_2 = PaneId::Terminal(3);
- tab.horizontal_split(new_pane_id_1, None, 1, None).unwrap();
+ tab.horizontal_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(new_pane_id_2, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_2, None, 1, None, None)
+ .unwrap();
tab.move_focus_down(1).unwrap();
tab_resize_down(&mut tab, 1);
@@ -4134,11 +4210,12 @@ pub fn resize_down_with_panes_above_aligned_left_with_current_pane() {
let pane_to_the_left = PaneId::Terminal(2);
let focused_pane = PaneId::Terminal(3);
let pane_above = PaneId::Terminal(4);
- tab.horizontal_split(pane_to_the_left, None, 1, None)
+ tab.horizontal_split(pane_to_the_left, None, 1, None, None)
+ .unwrap();
+ tab.vertical_split(focused_pane, None, 1, None, None)
.unwrap();
- tab.vertical_split(focused_pane, None, 1, None).unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(pane_above, None, 1, None).unwrap();
+ tab.vertical_split(pane_above, None, 1, None, None).unwrap();
tab.move_focus_down(1).unwrap();
tab_resize_down(&mut tab, 1);
@@ -4336,11 +4413,12 @@ pub fn resize_down_with_panes_below_aligned_left_with_current_pane() {
let pane_below_and_left = PaneId::Terminal(2);
let pane_below = PaneId::Terminal(3);
let focused_pane = PaneId::Terminal(4);
- tab.horizontal_split(pane_below_and_left, None, 1, None)
+ tab.horizontal_split(pane_below_and_left, None, 1, None, None)
.unwrap();
- tab.vertical_split(pane_below, None, 1, None).unwrap();
+ tab.vertical_split(pane_below, None, 1, None, None).unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(focused_pane, None, 1, None).unwrap();
+ tab.vertical_split(focused_pane, None, 1, None, None)
+ .unwrap();
tab_resize_down(&mut tab, 1);
assert_eq!(
@@ -4537,11 +4615,12 @@ pub fn resize_down_with_panes_above_aligned_right_with_current_pane() {
let focused_pane = PaneId::Terminal(2);
let pane_to_the_right = PaneId::Terminal(3);
let pane_above_and_right = PaneId::Terminal(4);
- tab.horizontal_split(focused_pane, None, 1, None).unwrap();
- tab.vertical_split(pane_to_the_right, None, 1, None)
+ tab.horizontal_split(focused_pane, None, 1, None, None)
+ .unwrap();
+ tab.vertical_split(pane_to_the_right, None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(pane_above_and_right, None, 1, None)
+ tab.vertical_split(pane_above_and_right, None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab.move_focus_left(1).unwrap();
@@ -4741,11 +4820,12 @@ pub fn resize_down_with_panes_below_aligned_right_with_current_pane() {
let pane_below = PaneId::Terminal(2);
let pane_below_and_right = PaneId::Terminal(3);
let pane_to_the_right = PaneId::Terminal(4);
- tab.horizontal_split(pane_below, None, 1, None).unwrap();
- tab.vertical_split(pane_below_and_right, None, 1, None)
+ tab.horizontal_split(pane_below, None, 1, None, None)
+ .unwrap();
+ tab.vertical_split(pane_below_and_right, None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(pane_to_the_right, None, 1, None)
+ tab.vertical_split(pane_to_the_right, None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_down(&mut tab, 1);
@@ -4940,16 +5020,16 @@ pub fn resize_down_with_panes_above_aligned_left_and_right_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab.move_focus_down(1).unwrap();
@@ -5231,16 +5311,16 @@ pub fn resize_down_with_panes_below_aligned_left_and_right_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_down(&mut tab, 1);
@@ -5521,22 +5601,22 @@ pub fn resize_down_with_panes_above_aligned_left_and_right_with_panes_to_the_lef
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.vertical_split(PaneId::Terminal(7), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(7), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(8), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(8), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_down(&mut tab, 1);
@@ -5903,22 +5983,22 @@ pub fn resize_down_with_panes_below_aligned_left_and_right_with_to_the_left_and_
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
- tab.vertical_split(PaneId::Terminal(7), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(7), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(8), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(8), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab.move_focus_up(1).unwrap();
@@ -6285,7 +6365,7 @@ pub fn cannot_resize_down_when_pane_below_is_at_minimum_height() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_down(&mut tab, 1);
@@ -6467,7 +6547,7 @@ pub fn resize_left_with_pane_to_the_left() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab_resize_left(&mut tab, 1);
@@ -6572,7 +6652,7 @@ pub fn resize_left_with_pane_to_the_right() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_left(&mut tab, 1);
@@ -6679,9 +6759,9 @@ pub fn resize_left_with_panes_to_the_left_and_right() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_left(&mut tab, 1);
@@ -6830,10 +6910,10 @@ pub fn resize_left_with_multiple_panes_to_the_left() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_right(1).unwrap();
tab_resize_left(&mut tab, 1);
@@ -6983,12 +7063,12 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab_resize_left(&mut tab, 1);
@@ -7181,12 +7261,12 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab.move_focus_left(1).unwrap();
@@ -7380,12 +7460,12 @@ pub fn resize_left_with_panes_to_the_left_aligned_bottom_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab_resize_left(&mut tab, 1);
@@ -7577,12 +7657,12 @@ pub fn resize_left_with_panes_to_the_right_aligned_bottom_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_left(&mut tab, 1);
@@ -7777,17 +7857,17 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_and_bottom_with_current_pa
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab_resize_left(&mut tab, 1);
@@ -8068,17 +8148,17 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_and_bottom_with_current_p
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab.move_focus_left(1).unwrap();
@@ -8360,23 +8440,23 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_and_bottom_with_panes_abov
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab_resize_down(&mut tab, 1);
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(7), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(7), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(8), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(8), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_left(&mut tab, 1);
@@ -8743,24 +8823,24 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_and_bottom_with_panes_abo
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab_resize_down(&mut tab, 1);
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(7), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(7), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(8), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(8), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_left(&mut tab, 1);
@@ -9122,7 +9202,7 @@ pub fn cannot_resize_left_when_pane_to_the_left_is_at_minimum_width() {
let size = Size { cols: 10, rows: 20 };
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab_resize_left(&mut tab, 1);
@@ -9165,7 +9245,7 @@ pub fn resize_right_with_pane_to_the_left() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab_resize_right(&mut tab, 1);
@@ -9271,7 +9351,7 @@ pub fn resize_right_with_pane_to_the_right() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_right(&mut tab, 1);
@@ -9378,9 +9458,9 @@ pub fn resize_right_with_panes_to_the_left_and_right() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_right(&mut tab, 1);
@@ -9530,10 +9610,10 @@ pub fn resize_right_with_multiple_panes_to_the_left() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_right(1).unwrap();
tab_resize_right(&mut tab, 1);
@@ -9683,13 +9763,13 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_right(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(4), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab_resize_right(&mut tab, 1);
@@ -9880,13 +9960,13 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_right(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(4), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_right(&mut tab, 1);
@@ -10079,13 +10159,13 @@ pub fn resize_right_with_panes_to_the_left_aligned_bottom_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_right(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(4), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_right(&mut tab, 1);
@@ -10278,13 +10358,13 @@ pub fn resize_right_with_panes_to_the_right_aligned_bottom_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_right(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(4), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab.move_focus_left(1).unwrap();
@@ -10480,17 +10560,17 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_and_bottom_with_current_p
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab_resize_right(&mut tab, 1);
@@ -10770,17 +10850,17 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_and_bottom_with_current_
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab.move_focus_left(1).unwrap();
@@ -11061,23 +11141,23 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_and_bottom_with_panes_abo
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab_resize_up(&mut tab, 1);
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(7), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(7), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(8), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(8), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_right(&mut tab, 1);
@@ -11443,24 +11523,24 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_and_bottom_with_panes_ab
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab_resize_up(&mut tab, 1);
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(7), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(7), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(8), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(8), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_right(&mut tab, 1);
@@ -11821,7 +11901,7 @@ pub fn cannot_resize_right_when_pane_to_the_left_is_at_minimum_width() {
let size = Size { cols: 10, rows: 20 };
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab_resize_right(&mut tab, 1);
@@ -11911,7 +11991,7 @@ pub fn resize_up_with_pane_above() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab_resize_up(&mut tab, 1);
@@ -12018,7 +12098,7 @@ pub fn resize_up_with_pane_below() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_up(&mut tab, 1);
@@ -12129,9 +12209,9 @@ pub fn resize_up_with_panes_above_and_below() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_up(&mut tab, 1);
@@ -12281,10 +12361,10 @@ pub fn resize_up_with_multiple_panes_above() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
tab_resize_up(&mut tab, 1);
@@ -12433,13 +12513,13 @@ pub fn resize_up_with_panes_above_aligned_left_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab_resize_up(&mut tab, 1);
@@ -12632,13 +12712,13 @@ pub fn resize_up_with_panes_below_aligned_left_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab_resize_up(&mut tab, 1);
@@ -12832,13 +12912,13 @@ pub fn resize_up_with_panes_above_aligned_right_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_up(&mut tab, 1);
@@ -13032,13 +13112,13 @@ pub fn resize_up_with_panes_below_aligned_right_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab.move_focus_up(1).unwrap();
@@ -13233,16 +13313,16 @@ pub fn resize_up_with_panes_above_aligned_left_and_right_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_up(&mut tab, 1);
@@ -13522,16 +13602,16 @@ pub fn resize_up_with_panes_below_aligned_left_and_right_with_current_pane() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab.move_focus_up(1).unwrap();
@@ -13812,22 +13892,22 @@ pub fn resize_up_with_panes_above_aligned_left_and_right_with_panes_to_the_left_
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.vertical_split(PaneId::Terminal(7), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(7), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(8), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(8), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_up(&mut tab, 1);
@@ -14193,23 +14273,23 @@ pub fn resize_up_with_panes_below_aligned_left_and_right_with_to_the_left_and_ri
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(4), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(4), None, 1, None, None)
.unwrap();
tab.move_focus_down(1).unwrap();
- tab.vertical_split(PaneId::Terminal(5), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(5), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(6), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(6), None, 1, None, None)
.unwrap();
tab.move_focus_up(1).unwrap();
tab.move_focus_left(1).unwrap();
- tab.vertical_split(PaneId::Terminal(7), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(7), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(8), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(8), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_up(&mut tab, 1);
@@ -14574,7 +14654,7 @@ pub fn cannot_resize_up_when_pane_above_is_at_minimum_height() {
};
let stacked_resize = true;
let mut tab = create_new_tab(size, stacked_resize);
- tab.horizontal_split(PaneId::Terminal(2), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab_resize_down(&mut tab, 1);
@@ -14657,7 +14737,8 @@ pub fn nondirectional_resize_increase_with_1_pane_to_left() {
let stacked_resize = false; // note - this is not the default
let mut tab = create_new_tab(size, stacked_resize);
let new_pane_id_1 = PaneId::Terminal(2);
- tab.vertical_split(new_pane_id_1, None, 1, None).unwrap();
+ tab.vertical_split(new_pane_id_1, None, 1, None, None)
+ .unwrap();
tab_resize_increase(&mut tab, 1);
// should behave like `resize_left_with_pane_to_the_left`
@@ -14691,10 +14772,10 @@ pub fn nondirectional_resize_increase_with_2_panes_to_left() {
};
let stacked_resize = false; // note - this is not the default
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_right(1).unwrap();
tab_resize_increase(&mut tab, 1);
@@ -14752,10 +14833,10 @@ pub fn nondirectional_resize_increase_with_1_pane_to_right_1_pane_above() {
};
let stacked_resize = false; // note - this is not the default
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
- tab.horizontal_split(PaneId::Terminal(3), None, 1, None)
+ tab.horizontal_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab_resize_increase(&mut tab, 1);
@@ -14811,9 +14892,9 @@ pub fn nondirectional_resize_increase_with_1_pane_to_right_1_pane_to_left() {
};
let stacked_resize = false; // note - this is not the default
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_increase(&mut tab, 1);
@@ -14870,9 +14951,9 @@ pub fn nondirectional_resize_increase_with_pane_above_aligned_right_with_current
};
let stacked_resize = false; // note - this is not the default
let mut tab = create_new_tab(size, stacked_resize);
- tab.vertical_split(PaneId::Terminal(2), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(2), None, 1, None, None)
.unwrap();
- tab.vertical_split(PaneId::Terminal(3), None, 1, None)
+ tab.vertical_split(PaneId::Terminal(3), None, 1, None, None)
.unwrap();
tab.move_focus_left(1).unwrap();
tab_resize_increase(&mut tab, 1);
diff --git a/zellij-server/src/unit/screen_tests.rs b/zellij-server/src/unit/screen_tests.rs
index e22656d2..d3608e5c 100644
--- a/zellij-server/src/unit/screen_tests.rs
+++ b/zellij-server/src/unit/screen_tests.rs
@@ -1901,7 +1901,10 @@ fn group_panes_following_focus() {
None,
false,
true,
- NewPanePlacement::Tiled(None),
+ NewPanePlacement::Tiled {
+ direction: None,
+ borderless: None,
+ },
Some(client_id),
None,
)
@@ -1959,7 +1962,10 @@ fn break_group_with_mouse() {
None,
false,
true,
- NewPanePlacement::Tiled(None),
+ NewPanePlacement::Tiled {
+ direction: None,
+ borderless: None,
+ },
Some(client_id),
None,
)
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap
index d322d6c1..44594fdc 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())"
---
-[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: None, cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), Tiled(None), false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None }), false), Exit]
+[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: None, cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), Tiled { direction: None, borderless: None }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None }), false), Exit]
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap
index b21357e7..eb4e7ad7 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())"
---
-[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: Some(100), cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), Tiled(None), false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None }), false), Exit]
+[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: Some(100), cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), Tiled { direction: None, borderless: None }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None }), false), Exit]
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap
index fc5e1af5..e6adbc55 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())"
---
-[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: None, cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), Tiled(Some(Down)), false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None }), false), Exit]
+[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: None, cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), Tiled { direction: Some(Down), borderless: None }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None }), false), Exit]
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_command_and_cwd.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_command_and_cwd.snap
index fcb5c135..a69e3b93 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_command_and_cwd.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_command_and_cwd.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", new_pane_instruction)"
---
-Some(SpawnTerminal(Some(RunCommand(RunCommand { command: "htop", args: [], cwd: Some("/some/folder"), hold_on_close: true, hold_on_start: false, originating_plugin: None, use_terminal_title: false })), None, Tiled(Some(Right)), false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None }), false))
+Some(SpawnTerminal(Some(RunCommand(RunCommand { command: "htop", args: [], cwd: Some("/some/folder"), hold_on_close: true, hold_on_start: false, originating_plugin: None, use_terminal_title: false })), None, Tiled { direction: Some(Right), borderless: Some(false) }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None }), false))
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap
index 57aaa650..d72dcdf5 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())"
---
-[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(None, None, Tiled(None), false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None }), false), Exit]
+[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(None, None, Tiled { direction: None, borderless: Some(false) }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None }), false), Exit]
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap
index 2bdd6975..73319df7 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())"
---
-[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(None, None, Tiled(Some(Right)), false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None }), false), Exit]
+[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(None, None, Tiled { direction: Some(Right), borderless: Some(false) }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None }), false), Exit]
diff --git a/zellij-utils/assets/prost/api.action.rs b/zellij-utils/assets/prost/api.action.rs
index b7ccb156..ee6d434f 100644
--- a/zellij-utils/assets/prost/api.action.rs
+++ b/zellij-utils/assets/prost/api.action.rs
@@ -481,6 +481,8 @@ pub struct NewTiledPanePayload {
pub direction: ::core::option::Option<i32>,
#[prost(bool, tag="3")]
pub near_current_pane: bool,
+ #[prost(bool, optional, tag="4")]
+ pub borderless: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -660,8 +662,8 @@ pub mod new_pane_placement {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum PlacementVariant {
- #[prost(bool, tag="1")]
- NoPreference(bool),
+ #[prost(message, tag="1")]
+ NoPreference(super::NoPreferenceOptions),
#[prost(message, tag="2")]
Tiled(super::TiledPlacement),
#[prost(message, tag="3")]
@@ -674,9 +676,17 @@ pub mod new_pane_placement {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
+pub struct NoPreferenceOptions {
+ #[prost(bool, optional, tag="1")]
+ pub borderless: ::core::option::Option<bool>,
+}
+#[allow(clippy::derive_partial_eq_without_eq)]
+#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TiledPlacement {
#[prost(enumeration="super::resize::ResizeDirection", optional, tag="1")]
pub direction: ::core::option::Option<i32>,
+ #[prost(bool, optional, tag="2")]
+ pub borderless: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -691,12 +701,16 @@ pub struct InPlaceConfig {
pub pane_id_to_replace: ::core::option::Option<PaneId>,
#[prost(bool, tag="2")]
pub close_replaced_pane: bool,
+ #[prost(bool, optional, tag="3")]
+ pub borderless: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StackedPlacement {
#[prost(message, optional, tag="1")]
pub pane_id: ::core::option::Option<PaneId>,
+ #[prost(bool, optional, tag="2")]
+ pub borderless: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
diff --git a/zellij-utils/assets/prost_ipc/client_server_contract.rs b/zellij-utils/assets/prost_ipc/client_server_contract.rs
index 51f8aca3..ccfe2610 100644
--- a/zellij-utils/assets/prost_ipc/client_server_contract.rs
+++ b/zellij-utils/assets/prost_ipc/client_server_contract.rs
@@ -656,6 +656,8 @@ pub struct NewTiledPaneAction {
pub pane_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, tag="7")]
pub near_current_pane: bool,
+ #[prost(bool, optional, tag="8")]
+ pub borderless: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -1121,7 +1123,7 @@ pub struct SwitchSessionAction {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewPanePlacement {
- #[prost(oneof="new_pane_placement::PlacementType", tags="1, 2, 3, 4, 5")]
+ #[prost(oneof="new_pane_placement::PlacementType", tags="1, 2, 3, 4, 5, 6, 7, 8")]
pub placement_type: ::core::option::Option<new_pane_placement::PlacementType>,
}
/// Nested message and enum types in `NewPanePlacement`.
@@ -1139,15 +1141,46 @@ pub mod new_pane_placement {
InPlace(super::NewPanePlacementInPlace),
#[prost(message, tag="5")]
Stacked(super::PaneId),
+ /// these new variants are so that we can send data along with the previous variants without compromising backwards compatibility by changing the above types
+ #[prost(message, tag="6")]
+ NoPreferenceWithOptions(super::NoPreferencePlacement),
+ #[prost(message, tag="7")]
+ TiledWithOptions(super::TiledPlacement),
+ #[prost(message, tag="8")]
+ StackedWithOptions(super::StackedPlacement),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
+pub struct NoPreferencePlacement {
+ #[prost(bool, optional, tag="1")]
+ pub borderless: ::core::option::Option<bool>,
+}
+#[allow(clippy::derive_partial_eq_without_eq)]
+#[derive(Clone, PartialEq, ::prost::Message)]
+pub struct TiledPlacement {
+ #[prost(enumeration="Direction", optional, tag="1")]
+ pub direction: ::core::option::Option<i32>,
+ #[prost(bool, optional, tag="2")]
+ pub borderless: ::core::option::Option<bool>,
+}
+#[allow(clippy::derive_partial_eq_without_eq)]
+#[derive(Clone, PartialEq, ::prost::Message)]
+pub struct StackedPlacement {
+ #[prost(message, optional, tag="1")]
+ pub pane_id_to_stack_under: ::core::option::Option<PaneId>,
+ #[prost(bool, optional, tag="2")]
+ pub borderless: ::core::option::Option<bool>,
+}
+#[allow(clippy::derive_partial_eq_without_eq)]
+#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewPanePlacementInPlace {
#[prost(message, optional, tag="1")]
pub pane_id_to_replace: ::core::option::Option<PaneId>,
#[prost(bool, tag="2")]
pub close_replaced_pane: bool,
+ #[prost(bool, optional, tag="3")]
+ pub borderless: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
diff --git a/zellij-utils/src/client_server_contract/common_types.proto b/zellij-utils/src/client_server_contract/common_types.proto
index eae6b937..1be7c4c9 100644
--- a/zellij-utils/src/client_server_contract/common_types.proto
+++ b/zellij-utils/src/client_server_contract/common_types.proto
@@ -376,6 +376,7 @@ message NewTiledPaneAction {
optional RunCommandAction command = 2;
optional string pane_name = 3;
bool near_current_pane = 7;
+ optional bool borderless = 8;
}
message NewInPlacePaneAction {
@@ -696,12 +697,31 @@ message NewPanePlacement {
FloatingPaneCoordinates floating = 3;
NewPanePlacementInPlace in_place = 4;
PaneId stacked = 5;
+ // these new variants are so that we can send data along with the previous variants without compromising backwards compatibility by changing the above types
+ NoPreferencePlacement no_preference_with_options = 6;
+ TiledPlacement tiled_with_options = 7;
+ StackedPlacement stacked_with_options = 8;
}
}
+message NoPreferencePlacement {
+ optional bool borderless = 1;
+}
+
+message TiledPlacement {
+ optional Direction direction = 1;
+ optional bool borderless = 2;
+}
+
+message StackedPlacement {
+ optional PaneId pane_id_to_stack_under = 1;
+ optional bool borderless = 2;
+}
+
message NewPanePlacementInPlace {
optional PaneId pane_id_to_replace = 1;
bool close_replaced_pane = 2;
+ optional bool borderless = 3;
}
message PaneIdWithPlugin {
diff --git a/zellij-utils/src/data.rs b/zellij-utils/src/data.rs
index 6c6237c1..0440fd41 100644
--- a/zellij-utils/src/data.rs
+++ b/zellij-utils/src/data.rs
@@ -2976,19 +2976,28 @@ impl FromStr for WebSharing {
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
pub enum NewPanePlacement {
- NoPreference,
- Tiled(Option<Direction>),
+ NoPreference {
+ borderless: Option<bool>,
+ },
+ Tiled {
+ direction: Option<Direction>,
+ borderless: Option<bool>,
+ },
Floating(Option<FloatingPaneCoordinates>),
InPlace {
pane_id_to_replace: Option<PaneId>,
close_replaced_pane: bool,
+ borderless: Option<bool>,
+ },
+ Stacked {
+ pane_id_to_stack_under: Option<PaneId>,
+ borderless: Option<bool>,
},
- Stacked(Option<PaneId>),
}
impl Default for NewPanePlacement {
fn default() -> Self {
- NewPanePlacement::NoPreference
+ NewPanePlacement::NoPreference { borderless: None }
}
}
@@ -3007,6 +3016,7 @@ impl NewPanePlacement {
NewPanePlacement::InPlace {
pane_id_to_replace: None,
close_replaced_pane,
+ borderless: None,
}
} else {
self
@@ -3019,12 +3029,13 @@ impl NewPanePlacement {
NewPanePlacement::InPlace {
pane_id_to_replace,
close_replaced_pane,
+ borderless: None,
}
}
pub fn should_float(&self) -> Option<bool> {
match self {
NewPanePlacement::Floating(_) => Some(true),
- NewPanePlacement::Tiled(_) => Some(false),
+ NewPanePlacement::Tiled { .. } => Some(false),
_ => None,
}
}
@@ -3038,16 +3049,28 @@ impl NewPanePlacement {
}
pub fn should_stack(&self) -> bool {
match self {
- NewPanePlacement::Stacked(_) => true,
+ NewPanePlacement::Stacked { .. } => true,
_ => false,
}
}
pub fn id_of_stack_root(&self) -> Option<PaneId> {
match self {
- NewPanePlacement::Stacked(id) => *id,
+ NewPanePlacement::Stacked {
+ pane_id_to_stack_under,
+ ..
+ } => *pane_id_to_stack_under,
_ => None,
}
}
+ pub fn get_borderless(&self) -> Option<bool> {
+ match self {
+ NewPanePlacement::NoPreference { borderless } => *borderless,
+ NewPanePlacement::Tiled { borderless, .. } => *borderless,
+ NewPanePlacement::Floating(coords) => coords.as_ref().and_then(|c| c.borderless),
+ NewPanePlacement::InPlace { borderless, .. } => *borderless,
+ NewPanePlacement::Stacked { borderless, .. } => *borderless,
+ }
+ }
}
type Context = BTreeMap<String, String>;
diff --git a/zellij-utils/src/input/actions.rs b/zellij-utils/src/input/actions.rs
index bcf79f03..27d880d3 100644
--- a/zellij-utils/src/input/actions.rs
+++ b/zellij-utils/src/input/actions.rs
@@ -234,6 +234,7 @@ pub enum Action {
command: Option<RunCommandAction>,
pane_name: Option<String>,
near_current_pane: bool,
+ borderless: Option<bool>,
},
/// Open a new pane in place of the focused one, suppressing it instead
NewInPlacePane {
@@ -596,11 +597,18 @@ impl Action {
NewPanePlacement::InPlace {
pane_id_to_replace: None,
close_replaced_pane: false,
+ borderless,
}
} else if stacked {
- NewPanePlacement::Stacked(None)
+ NewPanePlacement::Stacked {
+ pane_id_to_stack_under: None,
+ borderless,
+ }
} else {
- NewPanePlacement::Tiled(direction)
+ NewPanePlacement::Tiled {
+ direction,
+ borderless,
+ }
};
Ok(vec![Action::NewBlockingPane {
@@ -706,6 +714,7 @@ impl Action {
command: Some(run_command_action),
pane_name: name,
near_current_pane,
+ borderless,
}])
}
} else {
@@ -738,6 +747,7 @@ impl Action {
command: None,
pane_name: name,
near_current_pane,
+ borderless,
}])
}
}
diff --git a/zellij-utils/src/ipc/protobuf_conversion.rs b/zellij-utils/src/ipc/protobuf_conversion.rs
index 4b02cc7e..5d06cbe5 100644
--- a/zellij-utils/src/ipc/protobuf_conversion.rs
+++ b/zellij-utils/src/ipc/protobuf_conversion.rs
@@ -898,11 +898,13 @@ impl From<crate::input::actions::Action>
command,
pane_name,
near_current_pane,
+ borderless,
} => ActionType::NewTiledPane(NewTiledPaneAction {
direction: direction.map(|d| direction_to_proto_i32(d)),
command: command.map(|c| c.into()),
pane_name,
near_current_pane,
+ borderless,
}),
crate::input::actions::Action::NewInPlacePane {
command,
@@ -1469,6 +1471,7 @@ impl TryFrom<crate::client_server_contract::client_server_contract::Action>
command: new_tiled_action.command.map(|c| c.try_into()).transpose()?,
pane_name: new_tiled_action.pane_name,
near_current_pane: new_tiled_action.near_current_pane,
+ borderless: new_tiled_action.borderless,
})
},
ActionType::NewInPlacePane(new_in_place_action) => {
@@ -2551,26 +2554,58 @@ impl From<crate::data::NewPanePlacement>
{
fn from(placement: crate::data::NewPanePlacement) -> Self {
use crate::client_server_contract::client_server_contract::new_pane_placement::PlacementType;
+ use crate::client_server_contract::client_server_contract::{
+ NoPreferencePlacement, StackedPlacement, TiledPlacement,
+ };
let placement_type = match placement {
- crate::data::NewPanePlacement::NoPreference => PlacementType::NoPreference(true),
- crate::data::NewPanePlacement::Tiled(direction) => {
- PlacementType::Tiled(direction.map(direction_to_proto_i32).unwrap_or(0))
+ crate::data::NewPanePlacement::NoPreference {
+ borderless: Some(b),
+ } => PlacementType::NoPreferenceWithOptions(NoPreferencePlacement {
+ borderless: Some(b),
+ }),
+ crate::data::NewPanePlacement::NoPreference { borderless: None } => {
+ PlacementType::NoPreference(true)
},
+ crate::data::NewPanePlacement::Tiled {
+ direction,
+ borderless: Some(b),
+ } => PlacementType::TiledWithOptions(TiledPlacement {
+ direction: direction.map(direction_to_proto_i32),
+ borderless: Some(b),
+ }),
+ crate::data::NewPanePlacement::Tiled {
+ direction,
+ borderless: None,
+ } => PlacementType::Tiled(direction.map(direction_to_proto_i32).unwrap_or(0)),
crate::data::NewPanePlacement::Floating(coords) => {
PlacementType::Floating(coords.map(|c| c.into()).unwrap_or_default())
},
crate::data::NewPanePlacement::InPlace {
pane_id_to_replace,
close_replaced_pane,
+ borderless,
} => PlacementType::InPlace(
crate::client_server_contract::client_server_contract::NewPanePlacementInPlace {
pane_id_to_replace: pane_id_to_replace.map(|id| id.into()),
close_replaced_pane,
+ borderless,
},
),
- crate::data::NewPanePlacement::Stacked(pane_id) => {
- PlacementType::Stacked(pane_id.map(|id| id.into()).unwrap_or_default())
- },
+ crate::data::NewPanePlacement::Stacked {
+ pane_id_to_stack_under,
+ borderless: Some(b),
+ } => PlacementType::StackedWithOptions(StackedPlacement {
+ pane_id_to_stack_under: pane_id_to_stack_under.map(|id| id.into()),
+ borderless: Some(b),
+ }),
+ crate::data::NewPanePlacement::Stacked {
+ pane_id_to_stack_under,
+ borderless: None,
+ } => PlacementType::Stacked(
+ pane_id_to_stack_under
+ .map(|id| id.into())
+ .unwrap_or_default(),
+ ),
};
Self {
placement_type: Some(placement_type),
@@ -2591,14 +2626,43 @@ impl TryFrom<crate::client_server_contract::client_server_contract::NewPanePlace
.placement_type
.ok_or_else(|| anyhow!("NewPanePlacement missing placement_type"))?
{
- PlacementType::NoPreference(_) => Ok(crate::data::NewPanePlacement::NoPreference),
+ // New fields (with borderless support) take priority
+ PlacementType::NoPreferenceWithOptions(opts) => {
+ Ok(crate::data::NewPanePlacement::NoPreference {
+ borderless: opts.borderless,
+ })
+ },
+ PlacementType::TiledWithOptions(opts) => {
+ let direction = opts.direction.map(proto_i32_to_direction).transpose()?;
+ Ok(crate::data::NewPanePlacement::Tiled {
+ direction,
+ borderless: opts.borderless,
+ })
+ },
+ PlacementType::StackedWithOptions(opts) => {
+ let pane_id = opts
+ .pane_id_to_stack_under
+ .map(|id| id.try_into())
+ .transpose()?;
+ Ok(crate::data::NewPanePlacement::Stacked {
+ pane_id_to_stack_under: pane_id,
+ borderless: opts.borderless,
+ })
+ },
+ // Legacy fields (without borderless support)
+ PlacementType::NoPreference(_) => {
+ Ok(crate::data::NewPanePlacement::NoPreference { borderless: None })
+ },
PlacementType::Tiled(direction) => {
let direction = if direction == 0 {
None
} else {
Some(proto_i32_to_direction(direction)?)
};
- Ok(crate::data::NewPanePlacement::Tiled(direction))
+ Ok(crate::data::NewPanePlacement::Tiled {
+ direction,
+ borderless: None,
+ })
},
PlacementType::Floating(coords) => {
let coords = if coords == Default::default() {
@@ -2614,6 +2678,7 @@ impl TryFrom<crate::client_server_contract::client_server_contract::NewPanePlace
.map(|id| id.try_into())
.transpose()?,
close_replaced_pane: in_place.close_replaced_pane,
+ borderless: in_place.borderless,
}),
PlacementType::Stacked(pane_id) => {
let pane_id = if pane_id == Default::default() {
@@ -2621,7 +2686,10 @@ impl TryFrom<crate::client_server_contract::client_server_contract::NewPanePlace
} else {
Some(pane_id.try_into()?)
};
- Ok(crate::data::NewPanePlacement::Stacked(pane_id))
+ Ok(crate::data::NewPanePlacement::Stacked {
+ pane_id_to_stack_under: pane_id,
+ borderless: None,
+ })
},
}
}
diff --git a/zellij-utils/src/ipc/tests/roundtrip_tests.rs b/zellij-utils/src/ipc/tests/roundtrip_tests.rs
index a16759e3..1c928e6b 100644
--- a/zellij-utils/src/ipc/tests/roundtrip_tests.rs
+++ b/zellij-utils/src/ipc/tests/roundtrip_tests.rs
@@ -1290,6 +1290,7 @@ fn test_client_messages() {
direction: None,
pane_name: None,
near_current_pane: false,
+ borderless: None,
},
terminal_id: Some(1),
client_id: Some(100),
@@ -1314,6 +1315,7 @@ fn test_client_messages() {
direction: Some(Direction::Right),
pane_name: Some("my_pane_name".to_owned()),
near_current_pane: false,
+ borderless: Some(true),
},
terminal_id: Some(1),
client_id: Some(100),
diff --git a/zellij-utils/src/kdl/mod.rs b/zellij-utils/src/kdl/mod.rs
index f6b8aaa6..3567145d 100644
--- a/zellij-utils/src/kdl/mod.rs
+++ b/zellij-utils/src/kdl/mod.rs
@@ -805,6 +805,7 @@ impl Action {
command: run_command_action,
pane_name: name,
near_current_pane: false,
+ borderless: _,
} => {
let mut node = KdlNode::new("Run");
let mut node_children = KdlDocument::new();
@@ -1943,6 +1944,7 @@ impl TryFrom<(&KdlNode, &Options)> for Action {
command: Some(run_command_action),
pane_name: name,
near_current_pane: false,
+ borderless: None,
})
}
},
diff --git a/zellij-utils/src/plugin_api/action.proto b/zellij-utils/src/plugin_api/action.proto
index f8061bb6..802d0a0e 100644
--- a/zellij-utils/src/plugin_api/action.proto
+++ b/zellij-utils/src/plugin_api/action.proto
@@ -298,6 +298,7 @@ message NewTiledPanePayload {
optional RunCommandAction command = 1;
optional resize.ResizeDirection direction = 2;
bool near_current_pane = 3;
+ optional bool borderless = 4;
}
message MovePanePayload {
@@ -499,7 +500,7 @@ enum UnblockCondition {
// NewPanePlacement specifies where a new pane should be placed
message NewPanePlacement {
oneof placement_variant {
- bool no_preference = 1;
+ NoPreferenceOptions no_preference = 1;
TiledPlacement tiled = 2;
FloatingPlacement floating = 3;
InPlaceConfig in_place = 4;
@@ -507,8 +508,13 @@ message NewPanePlacement {
}
}
+message NoPreferenceOptions {
+ optional bool borderless = 1;
+}
+
message TiledPlacement {
optional resize.ResizeDirection direction = 1;
+ optional bool borderless = 2;
}
message FloatingPlacement {
@@ -518,10 +524,12 @@ message FloatingPlacement {
message InPlaceConfig {
optional PaneId pane_id_to_replace = 1;
bool close_replaced_pane = 2;
+ optional bool borderless = 3;
}
message StackedPlacement {
optional PaneId pane_id = 1;
+ optional bool borderless = 2;
}
message MouseEventPayload {
diff --git a/zellij-utils/src/plugin_api/action.rs b/zellij-utils/src/plugin_api/action.rs
index 2253d526..bc5bc87c 100644
--- a/zellij-utils/src/plugin_api/action.rs
+++ b/zellij-utils/src/plugin_api/action.rs
@@ -360,6 +360,7 @@ impl TryFrom<ProtobufAction> for Action {
.and_then(|d| ProtobufResizeDirection::from_i32(d))
.and_then(|d| d.try_into().ok());
let near_current_pane = payload.near_current_pane;
+ let borderless = payload.borderless;
if let Some(payload) = payload.command {
let pane_name = payload.pane_name.clone();
let run_command_action: RunCommandAction = payload.try_into()?;
@@ -368,6 +369,7 @@ impl TryFrom<ProtobufAction> for Action {
command: Some(run_command_action),
pane_name,
near_current_pane,
+ borderless,
})
} else {
Ok(Action::NewTiledPane {
@@ -375,6 +377,7 @@ impl TryFrom<ProtobufAction> for Action {
command: None,
pane_name: None,
near_current_pane,
+ borderless,
})
}
},
@@ -1255,6 +1258,7 @@ impl TryFrom<Action> for ProtobufAction {
command: run_command_action,
pane_name,
near_current_pane,
+ borderless,
} => {
let direction = direction.and_then(|direction| {
let protobuf_direction: ProtobufResizeDirection = direction.try_into().ok()?;
@@ -1274,6 +1278,7 @@ impl TryFrom<Action> for ProtobufAction {
direction,
command,
near_current_pane,
+ borderless,
},
)),
})
@@ -2276,13 +2281,18 @@ impl TryFrom<ProtobufNewPanePlacement> for NewPanePlacement {
use super::generated_api::api::action::new_pane_placement::PlacementVariant;
match protobuf_placement.placement_variant {
- Some(PlacementVariant::NoPreference(_)) => Ok(NewPanePlacement::NoPreference),
+ Some(PlacementVariant::NoPreference(opts)) => Ok(NewPanePlacement::NoPreference {
+ borderless: opts.borderless,
+ }),
Some(PlacementVariant::Tiled(tiled)) => {
let direction = tiled
.direction
.and_then(|d| ProtobufResizeDirection::from_i32(d))
.and_then(|d| d.try_into().ok());
- Ok(NewPanePlacement::Tiled(direction))
+ Ok(NewPanePlacement::Tiled {
+ direction,
+ borderless: tiled.borderless,
+ })
},
Some(PlacementVariant::Floating(floating)) => {
let coords = floating.coordinates.and_then(|c| c.try_into().ok());
@@ -2294,11 +2304,15 @@ impl TryFrom<ProtobufNewPanePlacement> for NewPanePlacement {
Ok(NewPanePlacement::InPlace {
pane_id_to_replace,
close_replaced_pane: config.close_replaced_pane,
+ borderless: config.borderless,
})
},
Some(PlacementVariant::Stacked(stacked)) => {
let pane_id = stacked.pane_id.and_then(|id| id.try_into().ok());
- Ok(NewPanePlacement::Stacked(pane_id))
+ Ok(NewPanePlacement::Stacked {
+ pane_id_to_stack_under: pane_id,
+ borderless: stacked.borderless,
+ })
},
None => Err("NewPanePlacement must have a placement variant"),
}
@@ -2309,16 +2323,25 @@ impl TryFrom<NewPanePlacement> for ProtobufNewPanePlacement {
type Error = &'static str;
fn try_from(placement: NewPanePlacement) -> Result<Self, &'static str> {
use super::generated_api::api::action::new_pane_placement::PlacementVariant;
+ use super::generated_api::api::action::NoPreferenceOptions;
let placement_variant = match placement {
- NewPanePlacement::NoPreference => Some(PlacementVariant::NoPreference(true)),
- NewPanePlacement::Tiled(direction) => {
+ NewPanePlacement::NoPreference { borderless } => {
+ Some(PlacementVariant::NoPreference(NoPreferenceOptions {
+ borderless,
+ }))
+ },
+ NewPanePlacement::Tiled {
+ direction,
+ borderless,
+ } => {
let direction = direction.and_then(|d| {
let protobuf_direction: ProtobufResizeDirection = d.try_into().ok()?;
Some(protobuf_direction as i32)
});
Some(PlacementVariant::Tiled(ProtobufTiledPlacement {
direction,
+ borderless,
}))
},
NewPanePlacement::Floating(coords) => {
@@ -2330,17 +2353,23 @@ impl TryFrom<NewPanePlacement> for ProtobufNewPanePlacement {
NewPanePlacement::InPlace {
pane_id_to_replace,
close_replaced_pane,
+ borderless,
} => {
let pane_id_to_replace = pane_id_to_replace.and_then(|id| id.try_into().ok());
Some(PlacementVariant::InPlace(ProtobufInPlaceConfig {
pane_id_to_replace,
close_replaced_pane,
+ borderless,
}))
},
- NewPanePlacement::Stacked(pane_id) => {
- let pane_id = pane_id.and_then(|id| id.try_into().ok());
+ NewPanePlacement::Stacked {
+ pane_id_to_stack_under,
+ borderless,
+ } => {
+ let pane_id = pane_id_to_stack_under.and_then(|id| id.try_into().ok());
Some(PlacementVariant::Stacked(ProtobufStackedPlacement {
pane_id,
+ borderless,
}))
},
};