Fix r_to_l argument as well to just be a flag

This commit is contained in:
itsjunetime
2025-11-06 18:21:18 -06:00
parent 6b37976357
commit e61eb9b846
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -1,6 +1,7 @@
# Unreleased # Unreleased
- Switched simd base64 crate for one that works on stable (from `vb64` to `base64_simd`) - Switched simd base64 crate for one that works on stable (from `vb64` to `base64_simd`)
- Allow boolean arguments to function as flags, without a `true` or `false` argument following the flag itself
# v0.4.3 # v0.4.3
+2 -2
View File
@@ -83,7 +83,7 @@ async fn inner_main() -> Result<(), WrappedErr> {
let flags = xflags::parse_or_exit! { let flags = xflags::parse_or_exit! {
/// Display the pdf with the pages starting at the right hand size and moving left and /// Display the pdf with the pages starting at the right hand size and moving left and
/// adjust input keys to match /// adjust input keys to match
optional -r,--r-to-l r_to_l: bool optional -r,--r-to-l
/// The maximum number of pages to display together, horizontally, at a time /// The maximum number of pages to display together, horizontally, at a time
optional -m,--max-wide max_wide: NonZeroUsize optional -m,--max-wide max_wide: NonZeroUsize
/// Fullscreen the pdf (hide document name, page count, etc) /// Fullscreen the pdf (hide document name, page count, etc)
@@ -270,7 +270,7 @@ async fn inner_main() -> Result<(), WrappedErr> {
let tui = Tui::new( let tui = Tui::new(
file_name, file_name,
flags.max_wide, flags.max_wide,
flags.r_to_l.unwrap_or_default(), flags.r_to_l,
is_kitty is_kitty
); );
+1 -1
View File
@@ -787,7 +787,7 @@ impl Tui {
} }
} }
// I want this to always return 0 'cause I just use it to return from `Self::handle_event`] // I want this to always return an option 'cause I just use it to return from `Self::handle_event`
#[expect(clippy::unnecessary_wraps)] #[expect(clippy::unnecessary_wraps)]
fn update_zoom(&mut self, f: impl FnOnce(&mut Zoom)) -> Option<InputAction> { fn update_zoom(&mut self, f: impl FnOnce(&mut Zoom)) -> Option<InputAction> {
if let Some(z) = &mut self.zoom { if let Some(z) = &mut self.zoom {