From 2122669165c32e327ad2c7ac2c28a69e65989297 Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Wed, 2 Aug 2006 21:21:08 +0000 Subject: del_item() updated --- src/calcurse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/calcurse.c') diff --git a/src/calcurse.c b/src/calcurse.c index a2d06d9..37f7545 100755 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -1,4 +1,4 @@ -/* $calcurse: calcurse.c,v 1.2 2006/08/01 20:36:29 culot Exp $ */ +/* $calcurse: calcurse.c,v 1.3 2006/08/02 21:21:08 culot Exp $ */ /* * Calcurse - text-based organizer @@ -777,7 +777,7 @@ void del_item(void) int nb_items = number_apoints_inday + number_events_inday; bool go_for_deletion = false; bool go_for_todo_del = false; - int to_be_removed = 0; + int to_be_removed; int answer = 0; int deleted_item_type = 0; @@ -809,6 +809,8 @@ void del_item(void) deleted_item_type == RECUR_APPT) { number_apoints_inday--; to_be_removed = 3; + } else if (deleted_item_type == 0) { + to_be_removed = 0; } else { /* NOTREACHED */ fputs(_("FATAL ERROR in del_item: no such type\n"), stderr); exit(EXIT_FAILURE); -- cgit v1.2.3