From 00e507fc0eb53fb00f34e55cd89bef4cfffa8663 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 9 Mar 2010 11:01:20 +0000 Subject: unposted: fix calendar bug updating repeating events allow calendar_edit to take arguments for editor --- Functions/Calendar/calendar | 4 ++++ Functions/Calendar/calendar_edit | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'Functions') diff --git a/Functions/Calendar/calendar b/Functions/Calendar/calendar index b87a14628..baf6b36da 100644 --- a/Functions/Calendar/calendar +++ b/Functions/Calendar/calendar @@ -328,6 +328,10 @@ fi (( tsched = t - mywarntime )) if (( tsched >= start && tsched <= stop)); then $showprog $start $stop "due in ${mywarnstr}: $showline" + elif (( tsched < start )); then + # We haven't actually shown it, but it's in the past, + # so treat it the same. Should probably rename this variable. + (( shown = 1 )) fi fi if [[ -n $sched ]]; then diff --git a/Functions/Calendar/calendar_edit b/Functions/Calendar/calendar_edit index e3ac5c39b..430c3b2e9 100644 --- a/Functions/Calendar/calendar_edit +++ b/Functions/Calendar/calendar_edit @@ -1,9 +1,14 @@ -local editor=${VISUAL:-${EDITOR:-vi}} local line calendar -local -a lockfiles +local -a lockfiles editor integer cal_running +if (( $# )); then + editor=("$@") +else + editor=(${VISUAL:-${EDITOR:-vi}}) +fi + sched | while read line; do [[ $line = *" calendar -s "<->" "<-> ]] && (( cal_running = 1 )) done -- cgit 1.4.1