From 9ca367fcdf3400e8d99466a4ea9e021766ad20d3 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Fri, 23 Oct 2026 14:20:03 -0400 Subject: Item actions --- crates/teleia/src/ui.rs | 4 ++-- 1 file 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 } -- cgit v1.3.1