mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Fix line input mode
Fix so that ABCD are no longer ignored.
This commit is contained in:
parent
003b2e37d4
commit
134038c1ce
1 changed files with 0 additions and 37 deletions
37
src/tty.c
37
src/tty.c
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue