diff --git a/Cargo.toml b/Cargo.toml index 8d48073..e8117ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "managarr" -version = "0.1.9" +version = "0.1.10" authors = ["Alex Clarke "] description = "A TUI for managing *arr servers" edition = "2021" diff --git a/src/models/mod.rs b/src/models/mod.rs index b0942a6..6ac72c0 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -208,7 +208,7 @@ impl HorizontallyScrollableText { } pub fn scroll_or_reset(&self, width: usize, is_current_selection: bool) { - if is_current_selection && self.text.len() - 8 > width { + if is_current_selection && self.text.len().saturating_sub(4) > width { self.scroll_text(); } else { self.reset_offset();