summaryrefslogtreecommitdiffstats
path: root/tasklst.c
diff options
context:
space:
mode:
authorAriadna Vigo <arivigodr@gmail.com>2020-09-29 22:23:50 +0200
committerAriadna Vigo <arivigodr@gmail.com>2020-09-29 22:23:50 +0200
commit4b988a705808217595fa9df9fce0c0e1b6e9b0da (patch)
tree7995f683885bb62a3edcbe8c5aece6e130d47b8a /tasklst.c
parent9400c00b9a7fb535b2a36edc5948bc3833cbc629 (diff)
New delete mode implemented
Diffstat (limited to 'tasklst.c')
-rw-r--r--tasklst.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tasklst.c b/tasklst.c
index a684b2e..d22169e 100644
--- a/tasklst.c
+++ b/tasklst.c
@@ -159,6 +159,9 @@ task_lst_del_task(TaskLst *list, int i)
if (next != NULL)
next->prev = prev;
+ if (list->first == del)
+ list->first = next;
+
free(del);
return 0;