Commit b216e6a8 authored by Arnim Läuger's avatar Arnim Läuger
Browse files

Merge pull request #777 from devsaurus/dev-cr

Skip CR in interactive mode
parents 7460f034 69f3a6f1
......@@ -549,12 +549,10 @@ static bool readline(lua_Load *load){
{
if(run_input)
{
/* handle CR key */
/* skip CR key */
if (ch == '\r')
{
char next;
if (uart_getc(&next))
ch = next;
continue;
}
/* backspace key */
else if (ch == 0x7f || ch == 0x08)
......@@ -580,7 +578,7 @@ static bool readline(lua_Load *load){
// }
/* end of line */
if (ch == '\r' || ch == '\n')
if (ch == '\n')
{
load->line[load->line_position] = 0;
if(uart0_echo) uart_putc('\n');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment