input: stop a modified Delete key from entering stuff into the buffer

When using option -K on an xterm-like terminal, pressing <Shift+Del>,
<Alt+Del>, or <Ctrl+Del> would enter "2~", "3~", or "5~", respectively,
into the buffer.  Now it will just report an "Unknown sequence".
This commit is contained in:
Benno Schulenberg 2018-07-15 09:18:39 +02:00
parent 6d3b16b761
commit 2fef7f647d

View File

@ -1085,6 +1085,8 @@ int convert_sequence(const int *seq, size_t length, int *consumed)
* Linux console/xterm/Terminal. */
if (length > 2 && seq[2] == '~')
return KEY_DC;
if (length > 4 && seq[4] == '~')
*consumed = 5;
break;
case '4': /* Esc [ 4 ~ == End on VT220/VT320/
* Linux console/xterm. */