diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-07-01 22:51:44 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-07-04 08:46:41 +0200 |
commit | 1c53c9d8c369d228c0fd0314b9915d218b5f5dca (patch) | |
tree | 70bcf2337a0e9750edcdb6aa0567767705689412 /src/todo.c | |
parent | 3f1359cdeb94c0b09e5c0cee7a487062e4ffc1e2 (diff) | |
download | calcurse-1c53c9d8c369d228c0fd0314b9915d218b5f5dca.zip |
Revise todo_delete_note_bynum()
Pass an item instead of passing a list item index (analogous to commit
02c90ba53a658686bad5cb5f88c555d9eef06399).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/todo.c')
-rw-r--r-- | src/todo.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -156,14 +156,8 @@ void todo_write(struct todo *todo, FILE * f) } /* Delete a note previously attached to a todo item. */ -void todo_delete_note_bynum(unsigned num) +void todo_delete_note(struct todo *todo) { - llist_item_t *i = LLIST_NTH(&todolist, num); - - if (!i) - EXIT(_("no such todo")); - struct todo *todo = LLIST_TS_GET_DATA(i); - if (!todo->note) EXIT(_("no note attached")); erase_note(&todo->note); |