src/io.c: Update todo item count on iCal import

Update the number of todo items when importing an iCal file to prevent
some items from being inaccessible.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-09-29 14:34:57 +02:00
parent c41eda256d
commit 4cd62fb0fb

View File

@ -2780,6 +2780,9 @@ io_import_data (enum import_type type, struct conf *conf, char *stream_name)
if (stream != stdin) if (stream != stdin)
file_close (stream, __FILE_POS__); file_close (stream, __FILE_POS__);
/* Update the number of todo items. */
todo_set_nb (todo_nb () + stats.todos);
if (ui_mode == UI_CURSES && !conf->skip_system_dialogs) if (ui_mode == UI_CURSES && !conf->skip_system_dialogs)
{ {
char read[BUFSIZ], stat[BUFSIZ]; char read[BUFSIZ], stat[BUFSIZ];