day_store_items(): Return the number of items found
Return the total number of items found instead of the pad length, since this is used to store items in non-interactive mode as well now. The pad length can still be calculated by using the appointment and event count parameters. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -295,14 +295,14 @@ app_arg(int add_line, struct date *day, long date, const char *fmt_apt,
|
||||
|
||||
int n = day_store_items(date, NULL, NULL, regex);
|
||||
|
||||
if (n > 1) {
|
||||
if (n > 0) {
|
||||
if (add_line)
|
||||
fputs("\n", stdout);
|
||||
arg_print_date(date);
|
||||
day_write_stdout(date, fmt_apt, fmt_rapt, fmt_ev, fmt_rev);
|
||||
}
|
||||
|
||||
return n - 1;
|
||||
return n;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user