mirror of
https://gitlab.com/hyask/swaysome.git
synced 2025-12-10 07:44:43 +01:00
Fix underflow in 'prev_output' calculation
This commit is contained in:
parent
465a4aff84
commit
1e6986558d
1 changed files with 1 additions and 1 deletions
|
|
@ -222,7 +222,7 @@ fn move_container_to_next_or_prev_output(stream: &UnixStream, go_to_prev: bool)
|
|||
};
|
||||
|
||||
let target_output = if go_to_prev {
|
||||
&outputs[(focused_output_index - 1 + outputs.len()) % outputs.len()]
|
||||
&outputs[(focused_output_index + outputs.len() - 1) % outputs.len()]
|
||||
} else {
|
||||
&outputs[(focused_output_index + 1) % outputs.len()]
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue