input: understand M-Bsp also when terminfo does not match the terminal

Always interpret ESC followed by BS or DEL as <Alt+Backspace>.

This fixes https://savannah.gnu.org/bugs/?58910.

Bug existed since commit 40b03162 from one week ago,
since M-Bsp was hard-bound to deleting a word backwards.
master
Benno Schulenberg 2020-08-07 18:50:26 +02:00
parent 4923119174
commit b0e3767af5
1 changed files with 2 additions and 1 deletions

View File

@ -940,7 +940,8 @@ int parse_kbinput(WINDOW *win)
if (keycode == '\t') if (keycode == '\t')
return SHIFT_TAB; return SHIFT_TAB;
#ifndef NANO_TINY #ifndef NANO_TINY
else if (keycode == KEY_BACKSPACE) else if (keycode == KEY_BACKSPACE || keycode == '\b' ||
keycode == DEL_CODE)
return CONTROL_SHIFT_DELETE; return CONTROL_SHIFT_DELETE;
#endif #endif
else if (!solitary) else if (!solitary)