feat(main): make empty / go to root

This commit is contained in:
xeruf 2024-09-07 16:06:59 +03:00
parent 132ea048a5
commit 593ebcddca
2 changed files with 4 additions and 2 deletions

View File

@ -101,7 +101,7 @@ To stop time-tracking completely, simply move to the root of all tasks.
+ match by task name prefix: if one or more tasks match, filter / activate (tries case-sensitive then case-insensitive)
+ no match: create & activate task
- `.2` - set view depth to the given number (how many subtask levels to show, default is 1)
- `/[TEXT]` - activate task or filter by smart-case substring match
- `/[TEXT]` - activate task or filter by smart-case substring match (empty: move to root)
- `||TASK` - create and activate a new task procedure (where subtasks automatically depend on the previously created task)
- `|[TASK]` - (un)mark current task as procedure or create a sibling task depending on the current one and move up

View File

@ -632,7 +632,9 @@ async fn main() -> Result<()> {
}
}
Some('/') => {
Some('/') => if arg.is_none() {
tasks.move_to(None);
} else {
let mut dots = 1;
let mut pos = tasks.get_position_ref();
for _ in iter.take_while(|c| c == &'/') {