WHERE short SendmailWait;
WHERE short SleepTime INITVAL (1);
WHERE short Timeout;
+WHERE short WrapMargin;
WHERE short WriteInc;
+
WHERE short ScoreThresholdDelete;
WHERE short ScoreThresholdRead;
WHERE short ScoreThresholdFlag;
+
#ifdef USE_IMAP
WHERE short ImapKeepalive;
#endif
** When set, searches will wrap around the first (or last) message. When
** unset, searches will not wrap.
*/
+ { "wrapmargin", DT_NUM, R_PAGER, UL &WrapMargin, 0 },
+ /*
+ ** .pp
+ ** Controls the margin left at the right side of the terminal when mutt's
+ ** pager does smart wrapping.
+ */
{ "write_inc", DT_NUM, R_NONE, UL &WriteInc, 10 },
/*
** .pp
wchar_t wc;
mbstate_t mbstate;
+ int wrap_cols = COLS - WrapMargin;
+
+ if (wrap_cols <= 0)
+ wrap_cols = COLS;
+
/* FIXME: this should come from lineInfo */
memset(&mbstate, 0, sizeof(mbstate));
k = mbrtowc (&wc, (char *)buf+ch, cnt-ch, &mbstate);
if (k == -2 || k == -1)
{
- if (col + 4 > COLS)
+ if (col + 4 > wrap_cols)
break;
col += 4;
if (pa)
if (wc == ' ')
space = ch;
t = wcwidth (wc);
- if (col + t > COLS)
+ if (col + t > wrap_cols)
break;
col += t;
if (pa)
{
space = ch;
t = (col & ~7) + 8;
- if (t > COLS)
+ if (t > wrap_cols)
break;
if (pa)
for (; col < t; col++)
}
else if (wc < 0x20 || wc == 0x7f)
{
- if (col + 2 > COLS)
+ if (col + 2 > wrap_cols)
break;
col += 2;
if (pa)
}
else if (wc < 0x100)
{
- if (col + 4 > COLS)
+ if (col + 4 > wrap_cols)
break;
col += 4;
if (pa)
}
else
{
- if (col + 1 > COLS)
+ if (col + 1 > wrap_cols)
break;
++col;
if (pa)