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
50c4cd6
..
9eb3547
100644
(file)
--- a/
pager.c
+++ b/
pager.c
@@
-64,6
+64,10
@@
static const char *Mailbox_is_read_only = N_("Mailbox is read-only.");
static const char *Function_not_permitted_in_attach_message_mode =
N_("Function not permitted in attach-message mode.");
static const char *Function_not_permitted_in_attach_message_mode =
N_("Function not permitted in attach-message mode.");
+/* hack to return to position when returning from index to same message */
+static int TopLine = 0;
+static HEADER *OldHdr = NULL;
+
#define CHECK_MODE(x) if (!(x)) \
{ \
mutt_flushinp (); \
#define CHECK_MODE(x) if (!(x)) \
{ \
mutt_flushinp (); \
@@
-643,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
@@
-655,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;
@@
-1691,8
+1700,26
@@
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 ();
mutt_refresh ();
+
+ if (IsHeader (extra) && OldHdr == extra->hdr && TopLine != topline
+ && lineInfo[curline].offset < sb.st_size-1) {
+ if (TopLine - topline > lines)
+ topline += lines;
+ else
+ topline = TopLine;
+ continue;
+ }
+ else
+ OldHdr = NULL;
+
ch = km_dokey (MENU_PAGER);
if (ch != -1)
mutt_clear_error ();
ch = km_dokey (MENU_PAGER);
if (ch != -1)
mutt_clear_error ();
@@
-2530,6
+2557,8
@@
mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra)
break;
case OP_BUFFY_LIST:
break;
case OP_BUFFY_LIST:
+ if (option (OPTFORCEBUFFYCHECK))
+ buffy_check (1);
buffy_list ();
redraw |= REDRAW_SIDEBAR;
break;
buffy_list ();
redraw |= REDRAW_SIDEBAR;
break;
@@
-2589,8
+2618,15
@@
mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra)
}
fclose (fp);
}
fclose (fp);
- if (IsHeader (extra))
+ if (IsHeader (extra))
{
Context->msgnotreadyet = -1;
Context->msgnotreadyet = -1;
+ if (rc == -1)
+ OldHdr = NULL;
+ else {
+ TopLine = topline;
+ OldHdr = extra->hdr;
+ }
+ }
cleanup_quote (&QuoteList);
cleanup_quote (&QuoteList);