diff --git a/src/main.sh b/src/main.sh index 15c9ce1..aae59c3 100755 --- a/src/main.sh +++ b/src/main.sh @@ -433,6 +433,9 @@ if [ "${1:-}" = "--day" ]; then ) key=$(echo "$selection" | head -1) line=$(echo "$selection" | tail -1) + if [ "$line" = "$key" ]; then + line="" + fi hour=$(echo "$line" | cut -d '|' -f 1) start=$(echo "$line" | cut -d '|' -f 2) end=$(echo "$line" | cut -d '|' -f 3) @@ -442,7 +445,7 @@ if [ "${1:-}" = "--day" ]; then hour="$DAY_START" fi exec $0 --new "$DISPLAY_DATE $hour:00" - elif [ -n "$fpath" ]; then + elif [ -z "$key" ] && [ -n "$fpath" ]; then fpath="$ROOT/$fpath" __edit "$start" "$end" "$fpath" fi