#include <lib-mime/mime.h>
#include <lib-mime/rfc3676.h>
-#include <lib-ui/curses.h>
+#include <lib-ui/lib-ui.h>
#include <lib-sys/unix.h>
p_clear(&stte, 1);
stte.s = s;
- stte.WrapMargin =
- ((s->flags & M_DISPLAY) ? (COLS - 4) : ((COLS - 4) <
- 72) ? (COLS - 4) : 72);
+ stte.WrapMargin = ((s->flags & M_DISPLAY) ? (getmaxx(main_w) - 4) :
+ ((getmaxx(main_w) - 4) < 72) ? (getmaxx(main_w) - 4) : 72);
stte.line_max = stte.WrapMargin * 4;
stte.line = p_new(char, stte.line_max + 1);
stte.param = p_new(char, STRING);
}
rc = mutt_body_handler (p, s);
state_putc ('\n', s);
- if (rc || ((s->flags & M_REPLYING)
- && (option (OPTINCLUDEONLYFIRST)) && (s->flags & M_FIRSTDONE)))
+ if (rc)
break;
}
s->fpin = fp;
}
}
- s->flags |= M_FIRSTDONE;
}
else if (s->flags & M_DISPLAY) {
state_mark_attach (s);
}
bail:
- s->flags = oflags | (s->flags & M_FIRSTDONE);
-
+ s->flags = oflags;
return (rc);
}