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
a78f522
..
9d5444c
100644
(file)
--- a/
pager.c
+++ b/
pager.c
@@
-25,6
+25,7
@@
#include "attach.h"
#include "mbyte.h"
#include "sidebar.h"
#include "attach.h"
#include "mbyte.h"
#include "sidebar.h"
+#include "buffy.h"
#include "mx.h"
#include "mx.h"
@@
-38,6
+39,7
@@
#include "lib/intl.h"
#include "lib/str.h"
#include "lib/rx.h"
#include "lib/intl.h"
#include "lib/str.h"
#include "lib/rx.h"
+#include "lib/debug.h"
#include <sys/stat.h>
#include <ctype.h>
#include <sys/stat.h>
#include <ctype.h>
@@
-679,8
+681,8
@@
resolve_types (char *buf, char *raw, struct line_t *lineInfo, int n, int last,
else if (check_attachment_marker ((char *) raw) == 0)
lineInfo[n].type = MT_COLOR_ATTACHMENT;
#endif
else if (check_attachment_marker ((char *) raw) == 0)
lineInfo[n].type = MT_COLOR_ATTACHMENT;
#endif
- else if (
safe
_strcmp ("-- \n", buf) == 0
- ||
safe
_strcmp ("-- \r\n", buf) == 0) {
+ else if (
mutt
_strcmp ("-- \n", buf) == 0
+ ||
mutt
_strcmp ("-- \r\n", buf) == 0) {
i = n + 1;
lineInfo[n].type = MT_COLOR_SIGNATURE;
i = n + 1;
lineInfo[n].type = MT_COLOR_SIGNATURE;
@@
-914,7
+916,7
@@
fill_buffer (FILE * f, long *last_pos, long offset, unsigned char *buf,
}
else if (*p == '\033' && *(p + 1) == ']'
&& check_attachment_marker ((char *) p) == 0) {
}
else if (*p == '\033' && *(p + 1) == ']'
&& check_attachment_marker ((char *) p) == 0) {
- d
print (2, (debugfile, "fill_buffer: S
een attachment marker.\n"));
+ d
ebug_print (2, ("s
een attachment marker.\n"));
while (*p++ != '\a') /* skip pseudo-ANSI sequence */
;
}
while (*p++ != '\a') /* skip pseudo-ANSI sequence */
;
}
@@
-973,8
+975,7
@@
static int format_line (struct line_t **lineInfo, int n, unsigned char *buf,
k = mbrtowc (&wc, (char *) buf + ch, cnt - ch, &mbstate);
if (k == -2 || k == -1) {
k = mbrtowc (&wc, (char *) buf + ch, cnt - ch, &mbstate);
if (k == -2 || k == -1) {
- dprint (1, (debugfile, "%s:%d: mbrtowc returned %d; errno = %d.\n",
- __FILE__, __LINE__, k, errno));
+ debug_print (1, ("mbrtowc returned %d; errno = %d.\n", k, errno));
if (col + 4 > wrap_cols)
break;
col += 4;
if (col + 4 > wrap_cols)
break;
col += 4;
@@
-1244,7
+1245,11
@@
display_line (FILE * f, long *last_pos, struct line_t **lineInfo, int n,
/* skip trailing blanks */
while (ch && (buf[ch] == ' ' || buf[ch] == '\t' || buf[ch] == '\r'))
ch--;
/* skip trailing blanks */
while (ch && (buf[ch] == ' ' || buf[ch] == '\t' || buf[ch] == '\r'))
ch--;
- cnt = ch + 1;
+ /* a very long word with leading spaces causes infinite wrapping */
+ if ((!ch) && (flags & M_PAGER_NSKIP))
+ buf_ptr = buf + cnt;
+ else
+ cnt = ch + 1;
}
else
buf_ptr = buf + cnt; /* a very long word... */
}
else
buf_ptr = buf + cnt; /* a very long word... */
@@
-1649,9
+1654,11
@@
mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra)
move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)),
option (OPTSTATUSONTOP) ? 0 : SidebarWidth);
SETCOLOR (MT_COLOR_STATUS);
move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)),
option (OPTSTATUSONTOP) ? 0 : SidebarWidth);
SETCOLOR (MT_COLOR_STATUS);
+ BKGDSET (MT_COLOR_STATUS);
mutt_paddstr (COLS - (option (OPTSTATUSONTOP) ? 0 : SidebarWidth),
buffer);
SETCOLOR (MT_COLOR_NORMAL);
mutt_paddstr (COLS - (option (OPTSTATUSONTOP) ? 0 : SidebarWidth),
buffer);
SETCOLOR (MT_COLOR_NORMAL);
+ BKGDSET (MT_COLOR_NORMAL);
}
/* if we're not using the index, update every time */
if (index == 0)
}
/* if we're not using the index, update every time */
if (index == 0)
@@
-2498,7
+2505,7
@@
mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra)
break;
case OP_BUFFY_LIST:
break;
case OP_BUFFY_LIST:
-
mutt_
buffy_list ();
+ buffy_list ();
redraw |= REDRAW_SIDEBAR;
break;
redraw |= REDRAW_SIDEBAR;
break;