ascii: Readd DEL_STR define

This commit is contained in:
ZyX 2017-03-05 00:14:11 +03:00
parent c6c48e8672
commit 2c8ad27652
2 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@
#define ESC '\033' #define ESC '\033'
#define ESC_STR "\033" #define ESC_STR "\033"
#define DEL 0x7f #define DEL 0x7f
#define DEL_STR "\177"
#define CSI 0x9b // Control Sequence Introducer #define CSI 0x9b // Control Sequence Introducer
#define CSI_STR "\233" #define CSI_STR "\233"
#define DCS 0x90 /* Device Control String */ #define DCS 0x90 /* Device Control String */

View File

@ -1015,7 +1015,7 @@ static const char *tui_tk_ti_getstr(const char *name, const char *value,
ILOG("libtermkey:kdch1=%s", value); ILOG("libtermkey:kdch1=%s", value);
// Vim: "If <BS> and <DEL> are now the same, redefine <DEL>." // Vim: "If <BS> and <DEL> are now the same, redefine <DEL>."
if (stty_erase != NULL && value != NULL && strcmp(stty_erase, value) == 0) { if (stty_erase != NULL && value != NULL && strcmp(stty_erase, value) == 0) {
return stty_erase[0] == DEL ? (char *)CTRL_H_STR : (char *)DEL_STR; return stty_erase[0] == DEL ? CTRL_H_STR : DEL_STR;
} }
} }