mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-11-05 00:04:46 +00:00
email_pager(): improved status bar and fixed EOF bug (last line shown twice)
This commit is contained in:
parent
d6841c517c
commit
be340f0c1c
@ -864,8 +864,10 @@ restart:
|
||||
readp = linebuf;
|
||||
if (!writep)
|
||||
writep = linebuf;
|
||||
if (get_line(fp, 0, writep, &pos) == -1)
|
||||
if (get_line(fp, 0, writep, &pos) == -1) {
|
||||
eof = 1;
|
||||
goto endscreen;
|
||||
}
|
||||
++linecount;
|
||||
if ((mime >= 1) && (!strncmp(writep, "--", 2))) {
|
||||
if (attachfp)
|
||||
@ -972,8 +974,9 @@ restart:
|
||||
readp = writep = NULL;
|
||||
}
|
||||
}
|
||||
endscreen:
|
||||
if ((*cursorrow == 22) || eof) {
|
||||
printf("\n%c[%05lu] %s | B)ack | T)op | H)drs | M)IME | Q)uit%c",
|
||||
printf("\n%c[%07lu] %s | B)ack | T)op | H)drs | M)IME | Q)uit%c",
|
||||
INVERSE,
|
||||
pos,
|
||||
(eof ? " ** END ** " : "SPACE continue reading"),
|
||||
|
Loading…
Reference in New Issue
Block a user