aboutsummaryrefslogtreecommitdiffstats
path: root/src/todo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/todo.c')
-rw-r--r--src/todo.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/todo.c b/src/todo.c
index ede3b50..9bd8f8a 100644
--- a/src/todo.c
+++ b/src/todo.c
@@ -1,7 +1,7 @@
/*
* Calcurse - text-based organizer
*
- * Copyright (c) 2004-2017 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. */