mirror of
https://github.com/wez/wezterm.git
synced 2024-08-16 17:50:28 +03:00
prevent running pane manipulation actions when float pane is active
This commit is contained in:
parent
e8ee2a8d2f
commit
128a1caaff
@ -91,10 +91,6 @@ pub async fn spawn_command_internal(
|
||||
None => anyhow::bail!("no src window when splitting a pane?"),
|
||||
};
|
||||
if let Some(tab) = mux.get_active_tab_for_window(src_window_id) {
|
||||
if tab.is_float_active() {
|
||||
bail!("cannot open split when float is active");
|
||||
}
|
||||
|
||||
let pane = tab
|
||||
.get_active_pane()
|
||||
.ok_or_else(|| anyhow!("tab to have a pane"))?;
|
||||
@ -124,9 +120,6 @@ pub async fn spawn_command_internal(
|
||||
None => anyhow::bail!("no src window when float a pane?"),
|
||||
};
|
||||
if let Some(tab) = mux.get_active_tab_for_window(src_window_id) {
|
||||
if tab.is_float_active() {
|
||||
bail!("cannot open split when float is active");
|
||||
}
|
||||
let pane = tab
|
||||
.get_active_pane()
|
||||
.ok_or_else(|| anyhow!("tab to have a pane"))?;
|
||||
|
@ -2509,6 +2509,21 @@ impl TermWindow {
|
||||
result => return Ok(result),
|
||||
}
|
||||
|
||||
if self.is_float_active() {
|
||||
match assignment {
|
||||
ActivatePaneByIndex(..) |
|
||||
ActivatePaneDirection(..) |
|
||||
SplitPane(..) |
|
||||
SplitVertical(..) |
|
||||
SplitHorizontal(..) |
|
||||
SpawnTab(..) |
|
||||
PaneSelect(..) => {
|
||||
return Ok(PerformAssignmentResult::Handled);
|
||||
},
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
let window = self.window.as_ref().map(|w| w.clone());
|
||||
|
||||
match assignment {
|
||||
|
Loading…
Reference in New Issue
Block a user