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:
Lukas Fleischer
2012-06-12 23:12:51 +02:00
parent 42c486d30d
commit cabc22e032
6 changed files with 88 additions and 4 deletions

View File

@@ -626,6 +626,18 @@ void calendar_move(enum move move, int count)
case WEEK_NEXT:
ret = date_change(&t, 0, count * WEEKINDAYS);
break;
case MONTH_PREV:
ret = date_change(&t, -count, 0);
break;
case MONTH_NEXT:
ret = date_change(&t, count, 0);
break;
case YEAR_PREV:
ret = date_change(&t, -count * YEARINMONTHS, 0);
break;
case YEAR_NEXT:
ret = date_change(&t, count * YEARINMONTHS, 0);
break;
case WEEK_START:
/* Normalize struct tm to get week day number. */
mktime(&t);