diff options
Diffstat (limited to 'src/todo.c')
-rw-r--r-- | src/todo.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -158,9 +158,7 @@ void todo_delete(struct todo *todo) */ void todo_resort(struct todo *t) { - llist_item_t *i = LLIST_FIND_FIRST(&todolist, t, NULL); - LLIST_REMOVE(&todolist, i); - LLIST_ADD_SORTED(&todolist, t, todo_cmp); + LLIST_REORDER(&todolist, t, todo_cmp); } /* Flag a todo item. */ |