From 1b0f7dca097e906f9ac604a134a02c21486441b1 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Mon, 19 Aug 2024 21:55:44 +0300 Subject: [PATCH] fix(main): more intuitive behavior when stopping tracking with stamp --- src/main.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index d285ad8..ef0e315 100644 --- a/src/main.rs +++ b/src/main.rs @@ -473,10 +473,13 @@ async fn main() { } Some(')') => { - tasks.move_to(None); - if let Some(arg) = arg { - if !tasks.track_from(arg) { - continue; + match arg { + None => tasks.move_to(None), + Some(arg) => { + if parse_tracking_stamp(arg).map(|stamp| tasks.track_at(stamp, None)).is_none() { + // So the error message is not covered up + continue + } } } }