aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins/sequence/src/state/selection.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2026-02-24 13:10:40 +0100
committerGitHub <noreply@github.com>2026-02-24 13:10:40 +0100
commit8cd6286c3ffc10d14fdafd5005fa89b0f7fdcd44 (patch)
treec6341f5e3e251ae17db0c3427ddaf1e54d4fa91c /default-plugins/sequence/src/state/selection.rs
parentAllow closing replaced panes when opening panes in place (#4760) (diff)
downloadsl0ppij-8cd6286c3ffc10d14fdafd5005fa89b0f7fdcd44.tar.gz
sl0ppij-8cd6286c3ffc10d14fdafd5005fa89b0f7fdcd44.tar.xz
sl0ppij-8cd6286c3ffc10d14fdafd5005fa89b0f7fdcd44.zip
remove sequence plugin (#4761)
Diffstat (limited to 'default-plugins/sequence/src/state/selection.rs')
-rw-r--r--default-plugins/sequence/src/state/selection.rs47
1 files changed, 0 insertions, 47 deletions
diff --git a/default-plugins/sequence/src/state/selection.rs b/default-plugins/sequence/src/state/selection.rs
deleted file mode 100644
index 2137f47d..00000000
--- a/default-plugins/sequence/src/state/selection.rs
+++ /dev/null
@@ -1,47 +0,0 @@
-use super::CommandEntry;
-
-pub struct Selection {
- pub current_selected_command_index: Option<usize>,
-}
-
-impl Selection {
- pub fn new() -> Self {
- Self {
- current_selected_command_index: None,
- }
- }
-
- pub fn move_up(&mut self, all_commands: &[CommandEntry]) {
- match self.current_selected_command_index.as_mut() {
- Some(i) if *i > 0 => {
- *i -= 1;
- },
- None => {
- self.current_selected_command_index = Some(all_commands.len().saturating_sub(1));
- },
- _ => {
- self.current_selected_command_index = None;
- },
- }
- }
-
- pub fn move_down(&mut self, all_commands: &[CommandEntry]) {
- match self.current_selected_command_index.as_mut() {
- Some(i) if *i < all_commands.len().saturating_sub(1) => {
- *i += 1;
- },
- None => {
- self.current_selected_command_index = Some(0);
- },
- _ => {
- self.current_selected_command_index = None;
- },
- }
- }
-}
-
-impl Default for Selection {
- fn default() -> Self {
- Self::new()
- }
-}