Add error message support to task undo

This commit is contained in:
Dheepak Krishnamurthy 2020-07-30 15:54:48 -06:00
parent d13ae4b567
commit ed3180ef2d
2 changed files with 15 additions and 5 deletions

View file

@ -69,7 +69,13 @@ fn main() -> Result<(), Box<dyn Error>> {
app.error = e;
}
},
Key::Char('u') => app.task_undo(),
Key::Char('u') => match app.task_undo() {
Ok(_) => (),
Err(e) => {
app.mode = AppMode::TaskError;
app.error = e;
}
},
Key::Char('e') => {
events.pause_event_loop(&mut terminal);
app.task_edit();