Move to next todo item after marking one as done

This commit is contained in:
kageru 2020-05-27 11:42:17 +02:00
parent 9503962dd5
commit b8fe625405

@ -50,6 +50,7 @@ impl TodoList {
pub fn toggle_current(&mut self) {
self.todos[self.selected].done = !self.todos[self.selected].done;
self.selected = (self.selected + 1).min(self.todos.len() - 1)
}
fn current(&self) -> &Todo {