diff --git a/display.c b/display.c index ce7600f..0863cbc 100644 --- a/display.c +++ b/display.c @@ -217,18 +217,12 @@ static void vtputc(int c) return ; } - if (c < 0x20) { + if (c < 0x20 || c == 0x7F) { vtputc('^'); vtputc(c ^ 0x40); return; } - if (c == 0x7f) { - vtputc('^'); - vtputc('?'); - return; - } - if (c >= 0x80 && c <= 0xA0) { static const char hex[] = "0123456789abcdef"; vtputc('\\'); diff --git a/input.c b/input.c index 677a13f..e9fa69e 100644 --- a/input.c +++ b/input.c @@ -509,7 +509,7 @@ static void echov( int c) { if( c == '\n') /* put out for */ echos( "") ; else { - if( c < ' ') { + if( c < ' ' || c == 0x7F) { echoc( '^') ; c ^= 0x40 ; } @@ -520,7 +520,8 @@ static void echov( int c) { static void rubc( char c) { rubout() ; - if( c < ' ') { + if( c < ' ' || c == 0x7F) { + /* ^x range */ rubout() ; if( c == '\n') { rubout() ;