From a6b611312bf30bc5180524f862ac99066fd2b0a6 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Fri, 22 Nov 2024 09:28:46 +0100 Subject: [PATCH] fix(tasks): correct task hints when showing sole details --- src/tasks.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tasks.rs b/src/tasks.rs index be4092a..287159d 100644 --- a/src/tasks.rs +++ b/src/tasks.rs @@ -1385,12 +1385,13 @@ impl Display for TasksRelay { let visible = self.viewed_tasks(); if visible.is_empty() { - writeln!(lock, "No tasks here matching{}", self.get_prompt_suffix())?; + if self.tasks.children_for(self.get_position()).next().is_some() { + writeln!(lock, "No tasks here matching{}", self.get_prompt_suffix())?; + } let (label, times) = self.times_tracked(); let mut times_recent = times.rev().take(6).collect_vec(); times_recent.reverse(); - // TODO Add recent prefix - writeln!(lock, "{}\n{}", label.italic(), times_recent.join("\n"))?; + writeln!(lock, "Recent {}\n{}", label.italic(), times_recent.join("\n"))?; return Ok(()); }