summaryrefslogtreecommitdiff
path: root/src/calcurse.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-02-16 07:48:25 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2016-02-16 07:53:12 +0100
commit65b699f7708eba7c504d8593be749fa4e0cd57c3 (patch)
tree37df200796a493dcd6806b28522721e7c01240f3 /src/calcurse.c
parentfeb059e8cff5fd1057faf88caa127623e35775d2 (diff)
downloadcalcurse-65b699f7708eba7c504d8593be749fa4e0cd57c3.zip
Make automatic selection of appointments/events smarter
Keep item selection when an item is moved (e.g. by changing the start time or description). Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/calcurse.c')
-rw-r--r--src/calcurse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index e550b76..c0d9624 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -48,11 +48,15 @@ int count, reg;
*/
static void do_storage(int day_changed)
{
+ struct day_item *day = ui_day_selitem();
+
day_process_storage(ui_calendar_get_slctd_day(), day_changed);
ui_day_load_items();
if (day_changed)
ui_day_sel_reset();
+ else if (day)
+ ui_day_set_selitem(day);
}
static inline void key_generic_change_view(void)