diff options
| author | LLLL Colonq <llll@colonq> | 2026-10-23 14:20:03 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-10-23 14:20:03 -0400 |
| commit | 9ca367fcdf3400e8d99466a4ea9e021766ad20d3 (patch) | |
| tree | 9475c148c2a87623791e40c188876a4c39f6387d /crates | |
| parent | ff604a53c2646252188a641771fb6e73e6538293 (diff) | |
Item actions
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/teleia/src/ui.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/teleia/src/ui.rs b/crates/teleia/src/ui.rs index 9f21fe2..49b8ad9 100644 --- a/crates/teleia/src/ui.rs +++ b/crates/teleia/src/ui.rs @@ -113,7 +113,7 @@ impl Cursor { self.change_started = tick; self.prev_index = self.index; self.index = val; - self.index %= self.bound; + if self.bound != 0 { self.index %= self.bound }; true } else { false } } @@ -124,7 +124,7 @@ impl Cursor { self.change_started = tick; self.prev_index = self.index; self.index = val; - self.index %= self.bound; + if self.bound != 0 { self.index %= self.bound; } } pub fn finish_visually(&mut self) { self.prev_index = self.index; } pub fn increment_unlocked(&mut self, tick: Tick) -> bool { self.set_unlocked(self.index + 1, tick); true } |
