diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kilo.c | 2 | ||||
-rw-r--r-- | src/teliva.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/kilo.c b/src/kilo.c index dc40fb0..b2f9a18 100644 --- a/src/kilo.c +++ b/src/kilo.c @@ -810,7 +810,7 @@ static void editorFind() { mvprintw(LINES-2, 0, "Find: %s", query); int c = getch(); - if (c == KEY_BACKSPACE) { + if (c == TELIVA_BACKSPACE) { if (qlen != 0) query[--qlen] = '\0'; last_match = -1; } else if (c == ESC || c == ENTER) { diff --git a/src/teliva.h b/src/teliva.h index 9a6038e..bd2d43c 100644 --- a/src/teliva.h +++ b/src/teliva.h @@ -11,6 +11,11 @@ enum KEY_ACTION { CTRL_F = 6, CTRL_G = 7, CTRL_H = 8, +#if APPLE + TELIVA_BACKSPACE = KEY_DELETE, +#else + TELIVA_BACKSPACE = KEY_BACKSPACE, +#endif TAB = 9, ENTER = 10, CTRL_L = 12, |