aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rq.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rq.c b/src/rq.c
index 7ea61a6..3382a1f 100644
--- a/src/rq.c
+++ b/src/rq.c
@@ -278,7 +278,12 @@ static int display_file(int fd, int ttyfd, long rate)
break;
case 'A': /* up */
case 'D': /* left */
- ;/* TODO previous */
+ while ((s != buffer) && strchr(" \f\n\r\t\v", *s)) s--;
+ while ((s != buffer) && !strchr(" \f\n\r\t\v", *s)) s--;
+ while ((s != buffer) && strchr(" \f\n\r\t\v", *s)) s--;
+ while ((s != buffer) && !strchr(" \f\n\r\t\v", *s)) s--;
+ if (s == buffer)
+ goto rewait;
break;
case 0:
break;