summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--help.c6
-rw-r--r--pager.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/help.c b/help.c
index 75ecd7fb..4defe764 100644
--- a/help.c
+++ b/help.c
@@ -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;
}
}
diff --git a/pager.c b/pager.c
index 7fa71301..3be2ca55 100644
--- a/pager.c
+++ b/pager.c
@@ -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++;
}
}