Fix line input mode

Fix so that ABCD are no longer ignored.
This commit is contained in:
Martin Lund 2024-06-09 13:03:56 +02:00
parent 003b2e37d4
commit 134038c1ce

View file

@ -2593,43 +2593,6 @@ int tty_connect(void)
case INPUT_MODE_LINE: case INPUT_MODE_LINE:
switch (input_char) switch (input_char)
{ {
case 27: // Escape
forward = false;
break;
case '[':
if (previous_char[0] == 27)
{
forward = false;
}
break;
case 'A':
case 'B':
case 'C':
case 'D':
if ((previous_char[1] == 27) && (previous_char[0] == '['))
{
// Handle arrow keys
switch (input_char)
{
case 'A': // Up arrow
// Ignore
break;
case 'B': // Down arrow
// Ignore
break;
case 'C': // Right arrow
// Ignore
break;
case 'D': // Left arrow
// Ignore
break;
}
forward = false;
}
break;
case '\b': case '\b':
case 127: // Backspace case 127: // Backspace
if (line_index) if (line_index)