Add key bindings to go to the previous/next month/year
In addition to generic key bindings for moving one day (week) forward/backward, define similar bindings for moving a month or a year. Of course, count prefixes are allowed here as well. Also add status bar hints and help texts. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -460,6 +460,30 @@ int main(int argc, char **argv)
|
||||
}
|
||||
break;
|
||||
|
||||
case KEY_GENERIC_PREV_MONTH:
|
||||
calendar_move(MONTH_PREV, count);
|
||||
inday = do_storage(1);
|
||||
wins_update(FLAG_CAL | FLAG_APP);
|
||||
break;
|
||||
|
||||
case KEY_GENERIC_NEXT_MONTH:
|
||||
calendar_move(MONTH_NEXT, count);
|
||||
inday = do_storage(1);
|
||||
wins_update(FLAG_CAL | FLAG_APP);
|
||||
break;
|
||||
|
||||
case KEY_GENERIC_PREV_YEAR:
|
||||
calendar_move(YEAR_PREV, count);
|
||||
inday = do_storage(1);
|
||||
wins_update(FLAG_CAL | FLAG_APP);
|
||||
break;
|
||||
|
||||
case KEY_GENERIC_NEXT_YEAR:
|
||||
calendar_move(YEAR_NEXT, count);
|
||||
inday = do_storage(1);
|
||||
wins_update(FLAG_CAL | FLAG_APP);
|
||||
break;
|
||||
|
||||
case KEY_START_OF_WEEK:
|
||||
if (wins_slctd() == CAL) {
|
||||
calendar_move(WEEK_START, count);
|
||||
|
||||
Reference in New Issue
Block a user