mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-26 12:17:19 +02:00
Change start or stop to support errors
This commit is contained in:
parent
e71c59e8b3
commit
ca1444865a
2 changed files with 44 additions and 41 deletions
|
@ -56,7 +56,13 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||
Key::Up | Key::Char('k') => app.previous(),
|
||||
Key::Char('d') => app.task_done(),
|
||||
Key::Char('x') => app.task_delete(),
|
||||
Key::Char('s') => app.task_start_or_stop(),
|
||||
Key::Char('s') => match app.task_start_or_stop() {
|
||||
Ok(_) => (),
|
||||
Err(e) => {
|
||||
app.mode = AppMode::TaskError;
|
||||
app.error = e;
|
||||
}
|
||||
},
|
||||
Key::Char('u') => app.task_undo(),
|
||||
Key::Char('e') => {
|
||||
events.pause_event_loop(&mut terminal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue