summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-09-29 14:34:57 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-10-04 11:07:33 +0200
commit4cd62fb0fba6ddb5c79e3d2dc109b5b7d98612e2 (patch)
tree0eea423ba24489ce1b2f436891441c0287e4b16c
parentc41eda256d7a963ee651b2532e9e18f76581fcfb (diff)
downloadcalcurse-4cd62fb0fba6ddb5c79e3d2dc109b5b7d98612e2.zip
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>
-rw-r--r--src/io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/io.c b/src/io.c
index 12c9494..b64dd58 100644
--- a/src/io.c
+++ b/src/io.c
@@ -2780,6 +2780,9 @@ io_import_data (enum import_type type, struct conf *conf, char *stream_name)
if (stream != stdin)
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)
{
char read[BUFSIZ], stat[BUFSIZ];