aboutsummaryrefslogtreecommitdiffstats
path: root/src/io.c
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2018-08-22 10:03:35 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2018-10-21 20:01:34 +0200
commit8c2ccebe3500accf57675553a88f55496eec394a (patch)
tree0084c1c612c1aa864af60e8053b385e7fabf78ca /src/io.c
parente97360df71421c16491d797c2ae0f1bcd57d3b0b (diff)
downloadcalcurse-8c2ccebe3500accf57675553a88f55496eec394a.tar.gz
calcurse-8c2ccebe3500accf57675553a88f55496eec394a.zip
Handling of modified flag
The flag modified (io.c) keeps track of the memory state of data: modified == 0: unchanged since load or last save modified == 1: changed since load or last save It is now unset in io_load_data() and io_save_cal() only. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/io.c b/src/io.c
index bb52bce..6e8ae55 100644
--- a/src/io.c
+++ b/src/io.c
@@ -905,6 +905,7 @@ void io_load_data(struct item_filter *filter)
io_load_app(filter);
io_load_todo(filter);
io_mutex_unlock();
+ io_unset_modified();
}
int io_reload_data(void)
@@ -958,9 +959,8 @@ int io_reload_data(void)
todo_init_list();
io_load_data(NULL);
- run_hook("post-load");
- io_unset_modified();
+ run_hook("post-load");
if (show_dialogs()) {
status_mesg(reload_success, enter);