aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-12-02 17:52:46 +0100
committerMattias Andrée <maandree@operamail.com>2015-12-02 17:52:46 +0100
commit28669b98b9e915161abeb1b7a79bdc9088f6d6c3 (patch)
treef4b1c195a3f51739a265d1f0e94eea3b702e2d77 /src
parentsupport for down, right, and p (diff)
downloadread-quickly-28669b98b9e915161abeb1b7a79bdc9088f6d6c3.tar.gz
read-quickly-28669b98b9e915161abeb1b7a79bdc9088f6d6c3.tar.bz2
read-quickly-28669b98b9e915161abeb1b7a79bdc9088f6d6c3.tar.xz
support up and left
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-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;