fix: handle edge case in workspace movement commands
This commit is contained in:
parent
dad57da905
commit
484e0ce17f
1 changed files with 4 additions and 0 deletions
|
|
@ -54,6 +54,8 @@ Scope {
|
||||||
if (index > uiState.workspaces.count) return;
|
if (index > uiState.workspaces.count) return;
|
||||||
let id;
|
let id;
|
||||||
if (index === uiState.workspaces.count) {
|
if (index === uiState.workspaces.count) {
|
||||||
|
if (uiState.workspaces.get(index - 1).workspace === Hypr.focusedWorkspace
|
||||||
|
&& Hypr.focusedWorkspace.toplevels.values.length === 0) return;
|
||||||
id = root.nextWorkspace();
|
id = root.nextWorkspace();
|
||||||
} else {
|
} else {
|
||||||
id = uiState.workspaces.get(index).workspace.id;
|
id = uiState.workspaces.get(index).workspace.id;
|
||||||
|
|
@ -77,6 +79,8 @@ Scope {
|
||||||
if (index > uiState.workspaces.count) return;
|
if (index > uiState.workspaces.count) return;
|
||||||
let id;
|
let id;
|
||||||
if (index === uiState.workspaces.count) {
|
if (index === uiState.workspaces.count) {
|
||||||
|
if (uiState.workspaces.get(index - 1).workspace === Hypr.focusedWorkspace
|
||||||
|
&& Hypr.focusedWorkspace.toplevels.values.length === 0) return;
|
||||||
id = nextWorkspace();
|
id = nextWorkspace();
|
||||||
} else {
|
} else {
|
||||||
id = uiState.workspaces.get(index).workspace.id;
|
id = uiState.workspaces.get(index).workspace.id;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue