projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
pager.c
diff --git
a/pager.c
b/pager.c
index
752792b
..
9eb3547
100644
(file)
--- a/
pager.c
+++ b/
pager.c
@@
-647,6
+647,9
@@
static struct q_class_t *classify_quote (struct q_class_t **QuoteList,
return class;
}
return class;
}
+static int brailleLine = -1;
+static int brailleCol = -1;
+
static int check_attachment_marker (char *);
static void
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)) {
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;
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;
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;
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
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;
fclose (fp);
if (IsHeader (extra)) {
Context->msgnotreadyet = -1;
- if (rc != -1) {
+ if (rc == -1)
+ OldHdr = NULL;
+ else {
TopLine = topline;
OldHdr = extra->hdr;
}
TopLine = topline;
OldHdr = extra->hdr;
}