From 901b67396e561225a49e5d876b085a1f320b4b01 Mon Sep 17 00:00:00 2001 From: Bobbi Webber-Manners Date: Sat, 27 Jun 2020 19:54:40 -0400 Subject: [PATCH] Use cursor row location (0x25) in the pager; robust to long lines! --- apps/email.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/email.c b/apps/email.c index b3f4f11..ab4efab 100644 --- a/apps/email.c +++ b/apps/email.c @@ -281,6 +281,7 @@ void update_highlighted(void) { */ void email_pager(void) { uint32_t pos = 0; + uint8_t *p = 0x25; // CURSOR ROW!! struct emailhdrs *h = get_headers(selection); uint8_t line, eof; char c; @@ -319,7 +320,8 @@ restart: } if (c == '\r') { ++line; - if (line == 22) { + if ((*p) == 22) { // Use the CURSOR ROW location + //if (line == 22) { putchar(0x0f); // INVERSE printf("[%05lu] SPACE continue reading | B)ack | T)op | H)drs | Q)uit", pos); putchar(0x0e); // NORMAL