X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pager.c;h=9eb354790b3cbfa993c25c5cbcb03b338888e0c1;hp=752792b3fd772d33d46f61e42c143a21ad484750;hb=d6988dab6bd378ccdf0f17aaa16de8aee1ceaf43;hpb=355d6c883e8aafb8f424c22aa576cf8262ed9e58 diff --git a/pager.c b/pager.c index 752792b..9eb3547 100644 --- a/pager.c +++ b/pager.c @@ -647,6 +647,9 @@ static struct q_class_t *classify_quote (struct q_class_t **QuoteList, return class; } +static int brailleLine = -1; +static int brailleCol = -1; + static int check_attachment_marker (char *); static void @@ -659,8 +662,10 @@ resolve_types (char *buf, char *raw, struct line_t *lineInfo, int n, int last, int found, offset, null_rx, i; if (n == 0 || ISHEADER (lineInfo[n - 1].type)) { - if (buf[0] == '\n') + if (buf[0] == '\n') { lineInfo[n].type = MT_COLOR_NORMAL; + getyx(stdscr, brailleLine, brailleCol); + } else if (n > 0 && (buf[0] == ' ' || buf[0] == '\t')) { lineInfo[n].type = lineInfo[n - 1].type; /* wrapped line */ (lineInfo[n].syntax)[0].color = (lineInfo[n - 1].syntax)[0].color; @@ -1695,7 +1700,13 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) redraw = 0; - move (statusoffset, COLS - 1); + if (option(OPTBRAILLEFRIENDLY)) { + if (brailleLine!=-1) { + move(brailleLine+1, 0); + brailleLine = -1; + } + } else + move (statusoffset, COLS-1); mutt_refresh (); if (IsHeader (extra) && OldHdr == extra->hdr && TopLine != topline @@ -2609,7 +2620,9 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) fclose (fp); if (IsHeader (extra)) { Context->msgnotreadyet = -1; - if (rc != -1) { + if (rc == -1) + OldHdr = NULL; + else { TopLine = topline; OldHdr = extra->hdr; }