summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2017-09-08 21:02:18 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2017-09-08 21:23:25 +0200
commit2fe9c7efcee3812d46f367d3321c924ca4152485 (patch)
tree649ee29fd702e7987f1a00240b88952e24c7c55c
parente943a8a4dbb8b5d6ad280ba2a576cdd9e7e66a63 (diff)
downloadcalcurse-2fe9c7efcee3812d46f367d3321c924ca4152485.tar.gz
calcurse-2fe9c7efcee3812d46f367d3321c924ca4152485.zip
Reload data after resolving save conflict
After resolving a save conflict with the merge tool, we need to reload the data files to import the result of the conflict resolution. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r--src/io.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/io.c b/src/io.c
index 0cf93dc..e6eb33f 100644
--- a/src/io.c
+++ b/src/io.c
@@ -550,8 +550,17 @@ void io_save_cal(enum save_display display)
if (read_only)
return;
- if (io_check_data_files_modified() && resolve_save_conflict())
+ if (io_check_data_files_modified() && resolve_save_conflict()) {
+ if (io_reload_data()) {
+ day_process_storage(ui_calendar_get_slctd_day(), 1);
+ ui_day_load_items();
+ ui_day_sel_reset();
+ notify_check_next_app(1);
+ ui_calendar_monthly_view_cache_set_invalid();
+ wins_update(FLAG_ALL);
+ }
return;
+ }
run_hook("pre-save");
io_mutex_lock();