From ab0fe682255f01e75b70a6ee3e95795020be8dd7 Mon Sep 17 00:00:00 2001 From: Lars Henriksen Date: Wed, 22 Aug 2018 20:18:36 +0200 Subject: Reload data after resolving save conflict (improved) After resolving a save conflict with the merge tool, a save operation has, in effect, occurred, and data files must be reloaded to import the result of the conflict resolution. This is a replacement for commit 2fe9c7e. The operations concerned with the user interface are kept out the io-operations (as in all other cases) and take place at the command-level in calcurse.c. and not at the io-level (io.c). Shorter, more concise prompt texts. Signed-off-by: Lars Henriksen Signed-off-by: Lukas Fleischer --- src/calcurse.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/calcurse.c') diff --git a/src/calcurse.c b/src/calcurse.c index 5a08d53..7739c0f 100644 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -271,7 +271,13 @@ static inline void key_generic_help(void) static inline void key_generic_save(void) { - io_save_cal(IO_SAVE_DISPLAY_BAR); + if (io_save_cal(IO_SAVE_DISPLAY_BAR) == IO_SAVE_RELOAD) { + ui_todo_load_items(); + ui_todo_sel_reset(); + do_storage(0); + notify_check_next_app(1); + ui_calendar_monthly_view_cache_set_invalid(); + } wins_update(FLAG_ALL); } -- cgit v1.2.3-54-g00ecf