diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2013-05-14 11:25:42 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2013-05-14 11:25:42 +0200 |
commit | e8e73e223b560b08b8ff6d0046b6726f2e92a5c5 (patch) | |
tree | d3cc92d457f8d570761a1139f62bb0e15f47ada2 | |
parent | 9e86e258f2a34a94e63665dd31571bbfb124d0f9 (diff) | |
download | calcurse-e8e73e223b560b08b8ff6d0046b6726f2e92a5c5.zip |
display_item_date(): Support punctual appointments
Display appointments having the same starting date as ending date using
a specific format that hides the end time ("12:00" instead of "12:00 ->
12:00").
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
-rw-r--r-- | src/day.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -416,8 +416,9 @@ display_item_date(struct day_item *day, int incolor, long date, int y, ch_recur = (day->type == RECUR_EVNT || day->type == RECUR_APPT) ? '*' : '-'; ch_notify = (day_item_get_state(day) & APOINT_NOTIFY) ? '!' : ' '; - mvwprintw(win, y, x, " %c%c%s -> %s", ch_recur, ch_notify, - a_st, a_end); + mvwprintw(win, y, x, " %c%c%s", ch_recur, ch_notify, a_st); + if (apt_tmp.dur) + mvwprintw(win, y, x + 3 + strlen(a_st), " -> %s", a_end); if (incolor == 0) custom_remove_attr(win, ATTR_HIGHEST); } |