forked from janek/mostr
Automatically move up a task on invalid input
This commit is contained in:
parent
a0c46b6ea1
commit
d74c20fc04
|
@ -109,7 +109,8 @@ async fn repl() {
|
||||||
}
|
}
|
||||||
match input.split_once(": ") {
|
match input.split_once(": ") {
|
||||||
None => {
|
None => {
|
||||||
position = EventId::parse(input).ok();
|
position = EventId::parse(input).ok().or(
|
||||||
|
position.and_then(|p| tasks.get(&p)).and_then(|t| t.parent_id()));
|
||||||
}
|
}
|
||||||
Some(s) => {
|
Some(s) => {
|
||||||
let mut tags: Vec<Tag> = s.1.split(" ").map(|t| Tag::Hashtag(t.to_string())).collect();
|
let mut tags: Vec<Tag> = s.1.split(" ").map(|t| Tag::Hashtag(t.to_string())).collect();
|
||||||
|
|
Loading…
Reference in New Issue