#endif
#include "mutt.h"
+#include "enter.h"
#include "mutt_curses.h"
#include "keymap.h"
#include "mutt_menu.h"
#include "sort.h"
#include "pager.h"
#include "attach.h"
+#include "recvattach.h"
#include "mbyte.h"
#include "sidebar.h"
#include "buffy.h"
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 (); \
move (statusoffset, COLS - 1);
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 ();
break;
case OP_BUFFY_LIST:
+ if (option (OPTFORCEBUFFYCHECK))
+ buffy_check (1);
buffy_list ();
redraw |= REDRAW_SIDEBAR;
break;
}
fclose (fp);
- if (IsHeader (extra))
+ if (IsHeader (extra)) {
Context->msgnotreadyet = -1;
+ if (rc == -1)
+ OldHdr = NULL;
+ else {
+ TopLine = topline;
+ OldHdr = extra->hdr;
+ }
+ }
cleanup_quote (&QuoteList);