From 010faf378964501fa0de0c104bdf38ffdec4c87f Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Wed, 30 Nov 2022 22:35:54 +0100 Subject: [PATCH] shell: Don't try to jump to missing workspaces --- src/shell/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/shell/mod.rs b/src/shell/mod.rs index f056ad7f..441e7674 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -1035,6 +1035,15 @@ impl Shell { ) -> Option> { let (to_output, to_idx) = to; let to_idx = to_idx.unwrap_or(state.common.shell.workspaces.active_num(to_output)); + if state + .common + .shell + .workspaces + .get(to_idx, to_output) + .is_none() + { + return None; + } if from_output == to_output && to_idx == state.common.shell.workspaces.active_num(from_output)