Browse Source

"On last screenful..." message will appear when trying to "z" beyond the earliest post.

pull/1/head
Sam Hunter 2 months ago
parent
commit
f41a9c0c25
1 changed files with 17 additions and 17 deletions
  1. +17
    -17
      edlog

+ 17
- 17
edlog View File

@ -31,7 +31,7 @@ help () {
headers::display () {
local -i START=${1:-1}
local -i END=$((SCR+START))
[ $END -le $MCNT ] || let END=$MCNT
[ $END -le $MCNT ] || { let END=$MCNT; echo "On last screenful of posts." ; }
for ((i=START;i<END;i++)) {
MARK=""
[ $i -eq $PTR ] && MARK="-> "
@ -128,20 +128,20 @@ while true ; do
[ $PTR -ge 0 ] || PTR=0
read -e -p "> " CMD
case "$CMD" in
g) let ST=0 ; let PTR=0; headers::display $ST ;;
h) headers::display $ST ;;
m) post::new ;;
n) [ $PTR -lt $((MCNT-1)) ] && ((PTR++)); post::show $(printf "%4.4d" $PTR) ;;
p) [ $PTR -gt 0 ] && ((PTR--)) ; post::show $(printf "%4.4d" $PTR) ;;
r) post::reply $(printf "%4.4d" $PTR) ;;
q) break ;;
z) [[ $ST -le $((MCNT-SCR)) ]] && let ST+=SCR; headers::display $ST ;;
'.'|t) post::show $(printf "%4.4d" $PTR) ;;
'?') help ;;
\|*) post::filter "$CMD" ;;
\:*) post::extras "$CMD" ;;
\!*) cmd::exec "$CMD" ;;
*) [[ "$CMD" =~ $MSGIDPAT ]] && post::show ${BASH_REMATCH[0]} || echo -e "?\a" ;;
esac
case "$CMD" in
g) let ST=0 ; let PTR=0; headers::display $ST ;;
h) headers::display $ST ;;
m) post::new ;;
n) [ $PTR -lt $((MCNT-1)) ] && ((PTR++)); post::show $(printf "%4.4d" $PTR) ;;
p) [ $PTR -gt 0 ] && ((PTR--)) ; post::show $(printf "%4.4d" $PTR) ;;
r) post::reply $(printf "%4.4d" $PTR) ;;
q) break ;;
z) [[ $ST -le $((MCNT-SCR)) ]] && let ST+=SCR; headers::display $ST ;;
'.'|t) post::show $(printf "%4.4d" $PTR) ;;
'?') help ;;
\|*) post::filter "$CMD" ;;
\:*) post::extras "$CMD" ;;
\!*) cmd::exec "$CMD" ;;
*) [[ "$CMD" =~ $MSGIDPAT ]] && post::show ${BASH_REMATCH[0]} || echo -e "?\a" ;;
esac
done

Loading…
Cancel
Save