diff options
-rw-r--r-- | help.c | 6 | ||||
-rw-r--r-- | pager.c | 6 |
2 files changed, 6 insertions, 6 deletions
@@ -87,14 +87,14 @@ mutt_compile_help (char *buf, size_t buflen, int menu, struct mapping_t *items) static int print_macro (FILE *f, int maxchar, const char **macro) { - int c = **macro; + int c = (unsigned char) **macro; int n = maxchar; while (c) { if (!IsPrint(c)) { - if (c >= ' ') + if (c >= ' ' && c != 127) c = '?'; else if (n < 2) c = 0; @@ -121,7 +121,7 @@ static int print_macro (FILE *f, int maxchar, const char **macro) break; default: fputc ('^', f); - c += '@'; + c = (c + '@') & 127; break; } } @@ -1284,7 +1284,7 @@ display_line (FILE *f, long *last_pos, struct line_t **lineInfo, int n, addch (c); col++; } - else if (iscntrl (c) && c < '@') + else if (iscntrl (c) && (c < '@' || c == 127)) { if ((c != '\r' && c !='\n') || (buf[ch+1] != '\n' && buf[ch+1] != '\0')) { @@ -1297,7 +1297,7 @@ display_line (FILE *f, long *last_pos, struct line_t **lineInfo, int n, } addch ('^'); - addch (c + '@'); + addch ((c + '@') & 127); col += 2; } } @@ -1314,7 +1314,7 @@ display_line (FILE *f, long *last_pos, struct line_t **lineInfo, int n, if (ISSPACE (c)) addch (c); /* unbreakable space */ else - addch ('.'); + addch ('?'); col++; } } |